From 1665e8758a4914cff9d5c7783fdcabe12d2b088e Mon Sep 17 00:00:00 2001 From: Charles Mack Date: Thu, 11 Sep 2025 09:39:47 -0500 Subject: [PATCH 1/2] UN-14078 update docker images to support python 3.11 --- Dockerfile | 46 ++++++++++++++++++++++------------------------ Makefile | 2 +- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index 76b86a2..a316c18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM unionpos/python:3.8.11b +FROM unionpos/python:3.11.8 ENV COUCHBASE_PKG "couchbase-server-enterprise_7.0.2-ubuntu18.04_amd64.deb" ENV MYSQL_PKG "mysql-apt-config_0.8.9-1_all.deb" @@ -13,38 +13,36 @@ RUN set -ex \ gnupg \ gpg-agent \ wget \ - libjemalloc1 \ - libjemalloc-dev \ ' \ && apt-get update \ && apt-get install -y --no-install-recommends build-essential $buildDeps \ - # Ubuntu key - && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 \ - # couchbase dev + # Install Couchbase dependencies + && apt-get install -y --no-install-recommends libtinfo6 \ + # Install Couchbase && wget -O $COUCHBASE_PKG http://packages.couchbase.com/releases/7.0.2/$COUCHBASE_PKG \ - && dpkg -i $COUCHBASE_PKG && rm $COUCHBASE_PKG \ - && wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add - \ - && echo "deb http://packages.couchbase.com/ubuntu bionic bionic/main" | tee /etc/apt/sources.list.d/couchbase.list \ - && apt-get update && apt-get install -y --no-install-recommends libcouchbase-dev \ - # mysql dev - && wget -O $MYSQL_PKG http://repo.mysql.com/$MYSQL_PKG \ - && dpkg -i $MYSQL_PKG && rm $MYSQL_PKG \ - && apt-key list \ - && apt-key update && apt-get update && apt-get install -y --no-install-recommends --allow-unauthenticated \ - libxml2-dev libxslt-dev libmysqlclient-dev mysql-client \ - # nodejs - && curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \ + && dpkg -i --force-depends $COUCHBASE_PKG && rm $COUCHBASE_PKG \ + # Note that we skipslibcouchbase-dev installation due to repository access issues + # CB should older version of the application docker image + # && wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | gpg --dearmor -o /usr/share/keyrings/couchbase-archive-keyring.gpg \ + # && echo "deb [signed-by=/usr/share/keyrings/couchbase-archive-keyring.gpg] http://packages.couchbase.com/ubuntu jammy jammy/main" | tee /etc/apt/sources.list.d/couchbase.list \ + # && apt-get update && apt-get install -y --no-install-recommends libcouchbase-dev \ + # Fix broken dependencies and install MySQL packages + && apt-get update && apt --fix-broken install -y \ + && apt-get install -y --no-install-recommends \ + libxml2-dev libxslt1-dev libmysqlclient-dev \ + # Install Node.js + && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ && apt-get install -y nodejs \ && node -v \ - # pwgen + # Install pwgen && apt-get update && apt-get install -y --no-install-recommends pwgen \ - && ln -s /usr/bin/pwgen /bin/pwgen \ - # python-dev & virtualenv - && apt-get update && apt-get install -y --no-install-recommends python-dev curl \ + && rm -f /bin/pwgen && ln -s /usr/bin/pwgen /bin/pwgen \ + # Install Python dev tools and virtualenv + && apt-get update && apt-get install -y --no-install-recommends python3-dev curl \ && pip install virtualenv \ - # redis cli + # Install Redis CLI && apt-get update && apt-get install -y --no-install-recommends redis-tools \ - # cleanup + # Cleanup && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /var/lib/apt/lists/* diff --git a/Makefile b/Makefile index 0dd2e5c..3ac617c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ export DOCKER_ORG ?= unionpos export DOCKER_IMAGE ?= $(DOCKER_ORG)/application -export DOCKER_TAG ?= 20230615 +export DOCKER_TAG ?= 20250911 export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG) export DOCKER_BUILD_FLAGS = --platform linux/amd64 From 45a032aff41b337f02d4d7df53a6f28a001d8f69 Mon Sep 17 00:00:00 2001 From: Charles Mack Date: Thu, 11 Sep 2025 15:53:00 -0500 Subject: [PATCH 2/2] adding mysql dev repos --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index a316c18..aeba719 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,9 @@ RUN set -ex \ && apt-get update && apt --fix-broken install -y \ && apt-get install -y --no-install-recommends \ libxml2-dev libxslt1-dev libmysqlclient-dev \ + # Install additional MySQL development libraries and build tools + && apt-get install -y --no-install-recommends pkg-config \ + && apt-get install -y --no-install-recommends default-libmysqlclient-dev \ # Install Node.js && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ && apt-get install -y nodejs \