Skip to content

Commit

Permalink
⬆️ Maintenance: upgrade docker image base to latest Debian Bookworm &…
Browse files Browse the repository at this point in the history
… latest python 3.10.14 🚨 (#5937)
  • Loading branch information
sanderegg authored Jun 14, 2024
1 parent 7b2d66a commit 9091014
Show file tree
Hide file tree
Showing 62 changed files with 74 additions and 112 deletions.
4 changes: 2 additions & 2 deletions packages/postgres-database/scripts/erd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

RUN apt-get update \
&& apt-get -y install --no-install-recommends\
Expand Down
2 changes: 1 addition & 1 deletion packages/postgres-database/scripts/erd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
.DEFAULT_GOAL := help

PYTHON_VERSION=3.10.10
PYTHON_VERSION=3.10.14

# locations
REPODIR := $(shell git rev-parse --show-toplevel)
Expand Down
1 change: 0 additions & 1 deletion packages/postgres-database/tests/docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
postgres:
volumes:
Expand Down
1 change: 0 additions & 1 deletion packages/postgres-database/tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
postgres:
image: "postgres:14.8-alpine@sha256:150dd39ccb7ae6c7ba6130c3582c39a30bb5d3d22cb08ad0ba37001e3f829abc"
Expand Down
4 changes: 2 additions & 2 deletions packages/service-integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

LABEL maintainer=pcrespov

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
postgres:
image: "postgres:14.8-alpine@sha256:150dd39ccb7ae6c7ba6130c3582c39a30bb5d3d22cb08ad0ba37001e3f829abc"
Expand Down
2 changes: 1 addition & 1 deletion packages/settings-library/tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def envs_from_docker_inspect() -> EnvVarsDict:
"PATH=/home/scu/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D",
"PYTHON_VERSION=3.10.10",
"PYTHON_VERSION=3.10.14",
"PYTHON_PIP_VERSION=22.3.1",
"PYTHON_SETUPTOOLS_VERSION=65.5.1",
"PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/d5cb0afaf23b8520f1bbcfed521017b4a95f5c01/public/get-pip.py",
Expand Down
2 changes: 1 addition & 1 deletion requirements/how-to-upgrade-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Both python and pip version are specified:
- in the services/scripts ``Dockerfile``:
```Dockerfile
ARG PYTHON_VERSION="3.9.12"
FROM python:${PYTHON_VERSION}-slim-buster as base
FROM python:${PYTHON_VERSION}-slim-bookworm as base
```
- in the CI ``.github/workflows/ci-testing-deploy.yml``
```yaml
Expand Down
4 changes: 2 additions & 2 deletions requirements/tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# - Can be installed with pyenv (SEE pyenv install --list )
#
#
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

ENV VIRTUAL_ENV=/home/scu/.venv

Expand Down
2 changes: 1 addition & 1 deletion requirements/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
.DEFAULT_GOAL := help

PYTHON_VERSION=3.10.10
PYTHON_VERSION=3.10.14

# locations
REPODIR := $(shell git rev-parse --show-toplevel)
Expand Down
4 changes: 2 additions & 2 deletions scripts/apt-packages-versions/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

RUN \
apt-get update && \
Expand Down
4 changes: 2 additions & 2 deletions scripts/erd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# - https://erdantic.drivendata.org/stable/
#

ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

RUN apt-get update \
&& apt-get -y install --no-install-recommends\
Expand Down
2 changes: 1 addition & 1 deletion scripts/maintenance/migrate_project/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM python:3.10.10-buster
FROM python:3.10.14-buster

RUN curl https://rclone.org/install.sh | bash && \
rclone --version
Expand Down
4 changes: 2 additions & 2 deletions scripts/mypy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base


COPY requirements.txt /requirements.txt
Expand Down
13 changes: 4 additions & 9 deletions scripts/openapi-pydantic-models-generator.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ set -o nounset
set -o pipefail
IFS=$'\n\t'

PYTHON_VERSION=3.10.10
PYTHON_VERSION=3.10.14
IMAGE_NAME="local/datamodel-code-generator:${PYTHON_VERSION}"
WORKDIR="$(pwd)"


Build()
{
Build() {
docker buildx build \
--build-arg PYTHON_VERSION="${PYTHON_VERSION}" \
--build-arg HOME_DIR="/home/$USER" \
Expand All @@ -35,9 +33,7 @@ ENTRYPOINT ["datamodel-codegen", \
EOF
}


Run()
{
Run() {
docker run \
-it \
--workdir="/home/$USER/workdir" \
Expand All @@ -50,8 +46,7 @@ Run()

}

Help()
{
Help() {
echo "Please check https://koxudaxi.github.io/datamodel-code-generator/ for help on usage"
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/pydeps-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# - Can be installed with pyenv (SEE pyenv install --list )
#
#
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base


RUN apt-get update \
Expand Down
12 changes: 4 additions & 8 deletions scripts/pydeps.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ set -o nounset
set -o pipefail
IFS=$'\n\t'

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PYTHON_VERSION=3.10.10
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
PYTHON_VERSION=3.10.14
IMAGE_NAME="local/pydeps-devkit:${PYTHON_VERSION}"
WORKDIR="$(pwd)"


Build()
{
Build() {
docker buildx build \
--load \
--build-arg PYTHON_VERSION="${PYTHON_VERSION}" \
Expand All @@ -23,9 +21,7 @@ Build()
"$SCRIPT_DIR/pydeps-docker"
}


Run()
{
Run() {
docker run \
-it \
--workdir="/home/$USER/workdir" \
Expand Down
4 changes: 2 additions & 2 deletions scripts/pyupgrade.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ IFS=$'\n\t'
#
#
# NOTE: check --py* flag in CLI when PYTHON_VERSION is modified
PYTHON_VERSION=3.10.10
PYTHON_VERSION=3.10.14
IMAGE_NAME="local/pyupgrade-devkit:${PYTHON_VERSION}"
WORKDIR="$(pwd)"

Expand All @@ -18,7 +18,7 @@ Build() {
--build-arg HOME_DIR="/home/$USER" \
--tag "$IMAGE_NAME" \
- <<EOF
FROM python:${PYTHON_VERSION}-slim-buster
FROM python:${PYTHON_VERSION}-slim-bookworm
RUN pip --no-cache-dir install --upgrade \
pip \
wheel \
Expand Down
4 changes: 2 additions & 2 deletions services/agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

#
# USAGE:
Expand Down
4 changes: 2 additions & 2 deletions services/api-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base
#
# USAGE:
# cd sercices/api-server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
postgres:
image: postgres:14.5-alpine@sha256:db802f226b620fc0b8adbeca7859eb203c8d3c9ce5d84870fadee05dea8f50ce
Expand Down
6 changes: 3 additions & 3 deletions services/autoscaling/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

#
# USAGE:
Expand All @@ -13,7 +13,7 @@ FROM python:${PYTHON_VERSION}-slim-buster as base
LABEL maintainer=sanderegg

# NOTE: to list the latest version run `make` inside `scripts/apt-packages-versions`
ENV DOCKER_APT_VERSION="5:24.0.5-1~debian.10~buster"
ENV DOCKER_APT_VERSION="5:26.1.4-1~debian.12~bookworm"

# for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/]
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ def get_docker_pull_images_on_start_bash_command(
return ""

compose = {
"version": '"3.8"',
"services": {
f"pre-pull-image-{n}": {"image": image_tag}
for n, image_tag in enumerate(docker_tags)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
autoscaling:
environment:
Expand Down
1 change: 0 additions & 1 deletion services/autoscaling/tests/manual/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
rabbit:
image: itisfoundation/rabbitmq:3.11.2-management
Expand Down
2 changes: 1 addition & 1 deletion services/autoscaling/tests/unit/test_utils_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ def test_get_new_node_docker_tags(
(
["nginx", "itisfoundation/simcore/services/dynamic/service:23.5.5"],
'echo "services:\n pre-pull-image-0:\n image: nginx\n pre-pull-image-1:\n '
'image: itisfoundation/simcore/services/dynamic/service:23.5.5\nversion: \'"3.8"\'\n"'
'image: itisfoundation/simcore/services/dynamic/service:23.5.5\n"'
" > /docker-pull.compose.yml"
" && "
'echo "#!/bin/sh\necho Pulling started at \\$(date)\ndocker compose --project-name=autoscaleprepull --file=/docker-pull.compose.yml pull --ignore-pull-failures" > /docker-pull-script.sh'
Expand Down
4 changes: 2 additions & 2 deletions services/catalog/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base
#
#
# USAGE:
Expand Down
6 changes: 3 additions & 3 deletions services/clusters-keeper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

#
# USAGE:
Expand All @@ -13,7 +13,7 @@ FROM python:${PYTHON_VERSION}-slim-buster as base
LABEL maintainer=sanderegg

# NOTE: to list the latest version run `make` inside `scripts/apt-packages-versions`
ENV DOCKER_APT_VERSION="5:24.0.5-1~debian.10~buster"
ENV DOCKER_APT_VERSION="5:26.1.4-1~debian.12~bookworm"

# for docker apt caching to work this needs to be added: [https://vsupalov.com/buildkit-cache-mount-dockerfile/]
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
dask-scheduler:
image: ${DOCKER_REGISTRY:-itisfoundation}/dask-sidecar:${DOCKER_IMAGE_TAG}
Expand Down
4 changes: 2 additions & 2 deletions services/dask-sidecar/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM --platform=${TARGETPLATFORM} python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM --platform=${TARGETPLATFORM} python:${PYTHON_VERSION}-slim-bookworm as base
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
Expand Down
4 changes: 2 additions & 2 deletions services/datcore-adapter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

#
# USAGE:
Expand Down
4 changes: 2 additions & 2 deletions services/director-v2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.10.10"
FROM python:${PYTHON_VERSION}-slim-buster as base
ARG PYTHON_VERSION="3.10.14"
FROM python:${PYTHON_VERSION}-slim-bookworm as base

#
# USAGE:
Expand Down
1 change: 0 additions & 1 deletion services/director-v2/docker-compose-extra.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
postgres:
image: postgres:14.5-alpine@sha256:db802f226b620fc0b8adbeca7859eb203c8d3c9ce5d84870fadee05dea8f50ce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DynamicServicesSchedulerSettings(BaseCustomSettings):
)

DYNAMIC_SIDECAR_DOCKER_COMPOSE_VERSION: str = Field(
"3.8", description="docker-compose spec version used in the compose-specs"
"3.8", description="docker-compose spec version used in the compose-specs", deprecated=True
)

DYNAMIC_SIDECAR_ENABLE_VOLUME_LIMITS: bool = Field(
Expand Down
1 change: 0 additions & 1 deletion services/docker-compose-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#
# NOTE: the dask-scheduler uses the same image as the dask-sidecar. there is no need to build it twice!
#
version: "3.8"
services:
service-integration:
image: local/service-integration:${BUILD_TARGET:?build_target_required}
Expand Down
2 changes: 0 additions & 2 deletions services/docker-compose-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'
services:
agent:
image: ${DOCKER_REGISTRY:-itisfoundation}/agent:${DOCKER_IMAGE_TAG:-latest}
api-server:
Expand Down
1 change: 0 additions & 1 deletion services/docker-compose-ops-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#
# NOTE: this stack cannot be called tools because it collides with default network created in services/static-webserver/client/tools/docker-compose.yml
# IMPORTANT: This stack IS NOT used in the deployed version
version: "3.8"

services:
minio:
Expand Down
1 change: 0 additions & 1 deletion services/docker-compose-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#
# NOTE: this stack cannot be called tools because it collides with default network created in services/static-webserver/client/tools/docker-compose.yml
# IMPORTANT: This stack IS NOT used in the deployed version
version: "3.8"

services:
adminer:
Expand Down
1 change: 0 additions & 1 deletion services/docker-compose.devel-frontend.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This gets used only after services/docker-compose.local.yml and overrides the definition of
# the static-webserver to be the only one running the dev image
version: "3.8"
services:
static-webserver:
image: ${DOCKER_REGISTRY:-itisfoundation}/static-webserver:development
Expand Down
1 change: 0 additions & 1 deletion services/docker-compose.devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# NOTES:
# - port 3000 used for ptsv
#
version: "3.8"
x-common-environment: &common-environment
# Enforces *_DEBUG option in all services. ONLY allowed in devel-mode!
DEBUG : "true"
Expand Down
Loading

0 comments on commit 9091014

Please sign in to comment.