From c8190ae400a772456d6c452d112108cceef44900 Mon Sep 17 00:00:00 2001 From: Jonny Rylands Date: Sun, 29 Dec 2024 15:33:06 +0000 Subject: [PATCH] Update devcontainer/RP/API package versions: base Debian image, docker, azcli, YQ (#4225) * Update devcontainer versions * Upgrade base image of RP and API to bookworm, bump docker version in RP * Update CHANGELOG.md --- .devcontainer/Dockerfile | 12 ++++++++---- CHANGELOG.md | 2 +- api_app/Dockerfile | 2 +- api_app/_version.py | 2 +- resource_processor/_version.py | 2 +- resource_processor/vmss_porter/Dockerfile | 9 ++++++--- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index a56f8d245..4dc75e802 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ # [Choice] Python version: 3.11 3.12, 3.13 ARG VARIANT="3.12" ARG TARGETPLATFORM="linux/amd64" -FROM --platform="${TARGETPLATFORM}" mcr.microsoft.com/vscode/devcontainers/python:dev-${VARIANT}-bullseye +FROM --platform="${TARGETPLATFORM}" mcr.microsoft.com/vscode/devcontainers/python:dev-${VARIANT}-bookworm # This will be set to true when running in VSCode ARG INTERACTIVE="false" @@ -33,11 +33,15 @@ COPY .devcontainer/scripts/docker-client.sh /tmp/ RUN /tmp/docker-client.sh $USERNAME # Install Docker +ARG DOCKER_CE_VERSION="5:27.4.1-1~debian.12~bookworm" +ARG DOCKER_CE_CLI_VERSION="5:27.4.1-1~debian.12~bookworm" +ARG DOCKER_COMPOSE_PLUGIN_VERSION="2.32.1-1~debian.12~bookworm" +ARG DOCKER_CONTAINERD_VERSION="1.7.24-1" RUN apt-get update && apt-get install -y ca-certificates curl gnupg lsb-release --no-install-recommends \ && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \ && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \ | tee /etc/apt/sources.list.d/docker.list > /dev/null \ - && apt-get update && apt-get install -y docker-ce="5:24.0.0-1~debian.11~bullseye" docker-ce-cli="5:24.0.0-1~debian.11~bullseye" docker-compose-plugin="2.21.0-1~debian.11~bullseye" containerd.io="1.6.24-1" docker-buildx-plugin --no-install-recommends \ + && apt-get update && apt-get install -y docker-ce="$DOCKER_CE_VERSION" docker-ce-cli="$DOCKER_CE_CLI_VERSION" docker-compose-plugin="$DOCKER_COMPOSE_PLUGIN_VERSION" containerd.io="$DOCKER_CONTAINERD_VERSION" docker-buildx-plugin --no-install-recommends \ && apt-get clean -y && rm -rf /var/lib/apt/lists/* # Install Certbot @@ -75,12 +79,12 @@ COPY ["airlock_processor/requirements.txt", "/tmp/pip-tmp/airlock_processor/"] RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt # Install azure-cli -ARG AZURE_CLI_VERSION=2.67.0-1~bullseye +ARG AZURE_CLI_VERSION=2.67.0-1~bookworm COPY .devcontainer/scripts/azure-cli.sh /tmp/ RUN export AZURE_CLI_VERSION=${AZURE_CLI_VERSION} \ && /tmp/azure-cli.sh -ARG YQ_VERSION="v4.33.3" +ARG YQ_VERSION="v4.44.6" RUN curl -L --fail -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" \ && chmod +x /usr/local/bin/yq diff --git a/CHANGELOG.md b/CHANGELOG.md index 854f6b78b..184885f51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ ENHANCEMENTS: * Update Windows VM Images ([#4198](https://github.com/microsoft/AzureTRE/pull/4198)) * Enhance DPI of Linux display ([[#4200](https://github.com/microsoft/AzureTRE/issues/4200)]) * Update Admin VM versions ([[#4217](https://github.com/microsoft/AzureTRE/issues/4217)]) - +* Update devcontainer/RP/API package versions: base image, docker, az cli, YQ ([#4225](https://github.com/microsoft/AzureTRE/pull/4225)) BUG FIXES: * Update KeyVault references in API to use the version so Terraform cascades the update ([#4112](https://github.com/microsoft/AzureTRE/pull/4112)) diff --git a/api_app/Dockerfile b/api_app/Dockerfile index eaa74dd72..fc8b93c67 100644 --- a/api_app/Dockerfile +++ b/api_app/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-slim-bullseye AS base +FROM python:3.12-slim-bookworm AS base COPY requirements.txt /. RUN pip3 install --no-cache-dir -r requirements.txt diff --git a/api_app/_version.py b/api_app/_version.py index be6f6da96..8815fb52f 100644 --- a/api_app/_version.py +++ b/api_app/_version.py @@ -1 +1 @@ -__version__ = "0.20.2" +__version__ = "0.20.3" diff --git a/resource_processor/_version.py b/resource_processor/_version.py index 17c1a6260..b2385cb40 100644 --- a/resource_processor/_version.py +++ b/resource_processor/_version.py @@ -1 +1 @@ -__version__ = "0.10.2" +__version__ = "0.10.3" diff --git a/resource_processor/vmss_porter/Dockerfile b/resource_processor/vmss_porter/Dockerfile index ffa2a4e65..7bec548ab 100644 --- a/resource_processor/vmss_porter/Dockerfile +++ b/resource_processor/vmss_porter/Dockerfile @@ -1,12 +1,12 @@ # syntax=docker/dockerfile:1 -FROM python:3.12-slim-bullseye +FROM python:3.12-slim-bookworm SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache # Install Azure CLI -ARG AZURE_CLI_VERSION=2.67.0-1~bullseye +ARG AZURE_CLI_VERSION=2.67.0-1~bookworm COPY scripts/azure-cli.sh /tmp/ RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ export AZURE_CLI_VERSION=${AZURE_CLI_VERSION} \ @@ -49,12 +49,15 @@ RUN export PORTER_VERSION=${PORTER_VERSION} \ ENV PATH ${PORTER_HOME_V1}:$PATH # Install Docker +ARG DOCKER_CE_VERSION="5:27.4.1-1~debian.12~bookworm" +ARG DOCKER_CE_CLI_VERSION="5:27.4.1-1~debian.12~bookworm" +ARG DOCKER_CONTAINERD_VERSION="1.7.24-1" RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release --no-install-recommends \ && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \ && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \ | tee /etc/apt/sources.list.d/docker.list > /dev/null \ - && apt-get update && apt-get install -y docker-ce="5:23.0.3-1~debian.11~bullseye" docker-ce-cli="5:23.0.3-1~debian.11~bullseye" containerd.io="1.6.20-1" --no-install-recommends + && apt-get update && apt-get install -y docker-ce="$DOCKER_CE_VERSION" docker-ce-cli="$DOCKER_CE_CLI_VERSION" containerd.io="$DOCKER_CONTAINERD_VERSION" --no-install-recommends COPY ./vmss_porter/config.yaml ${PORTER_HOME_V1}/