From 0f1ef4e54c52c6140c10f024e3b4a9622d5cdf6a Mon Sep 17 00:00:00 2001 From: Heitor Neiva Date: Thu, 8 Feb 2024 14:44:15 +0100 Subject: [PATCH] ci: Use docker slim images where possible --- taskcluster/docker/fetch/Dockerfile | 3 ++- taskcluster/docker/python/Dockerfile | 16 ++++++++++++---- taskcluster/docker/skopeo/Dockerfile | 3 ++- taskcluster/kinds/tests/kind.yml | 3 ++- taskcluster/scripts/pyenv-setup | 2 +- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/taskcluster/docker/fetch/Dockerfile b/taskcluster/docker/fetch/Dockerfile index 1dad786dd..41a94170d 100644 --- a/taskcluster/docker/fetch/Dockerfile +++ b/taskcluster/docker/fetch/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:11 +FROM debian:12-slim +MAINTAINER Release Engineering ### Add worker user and setup its workspace. RUN mkdir /builds && \ diff --git a/taskcluster/docker/python/Dockerfile b/taskcluster/docker/python/Dockerfile index b5cafa08d..6cb654bb3 100644 --- a/taskcluster/docker/python/Dockerfile +++ b/taskcluster/docker/python/Dockerfile @@ -2,8 +2,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -FROM python:3.9 -LABEL maintainer="Andrew Halberstadt " +FROM python:3.12-slim +MAINTAINER Release Engineering # Add worker user RUN mkdir /builds && \ @@ -13,8 +13,16 @@ RUN mkdir /builds && \ # %include-run-task -RUN apt-get update && apt-get install -y --force-yes --no-install-recommends \ - mercurial build-essential zlib1g-dev libssl-dev git +RUN apt-get update \ + && apt-get install -y --reinstall ca-certificates \ + && apt-get install -y --force-yes --no-install-recommends \ + mercurial \ + build-essential \ + zlib1g-dev \ + libssl-dev \ + curl \ + git \ + build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev pkg-config ENV SHELL=/bin/bash \ HOME=/builds/worker \ diff --git a/taskcluster/docker/skopeo/Dockerfile b/taskcluster/docker/skopeo/Dockerfile index efcd950a0..f843b76ca 100644 --- a/taskcluster/docker/skopeo/Dockerfile +++ b/taskcluster/docker/skopeo/Dockerfile @@ -27,7 +27,8 @@ RUN ["/usr/local/go/bin/go", "build", \ "./cmd/umoci"] -FROM debian:buster +FROM debian:12-slim +MAINTAINER Release Engineering # %include-run-task diff --git a/taskcluster/kinds/tests/kind.yml b/taskcluster/kinds/tests/kind.yml index 9fa94b919..7a8c4b05a 100644 --- a/taskcluster/kinds/tests/kind.yml +++ b/taskcluster/kinds/tests/kind.yml @@ -48,9 +48,9 @@ tasks: TOX_PARALLEL_NO_SPINNER: "1" run: command: >- + pyenv local 3.12 3.11 3.10 3.9 3.8 && pip install --user -r requirements/test.txt --require-hashes && pip install --user --no-deps . && - pyenv local 3.12 3.11 3.10 3.9 3.8 && tox --parallel type-check: description: "Run type checking against src with Pyright" @@ -58,6 +58,7 @@ tasks: symbol: type-check run: command: >- + pyenv local 3.12 3.11 3.10 3.9 3.8 && pip install --user -r requirements/test.txt --require-hashes && pip install --user --no-deps . && pyright diff --git a/taskcluster/scripts/pyenv-setup b/taskcluster/scripts/pyenv-setup index 2fa29b546..bbc398b56 100644 --- a/taskcluster/scripts/pyenv-setup +++ b/taskcluster/scripts/pyenv-setup @@ -23,7 +23,7 @@ git -C "$(pyenv root)" rev-parse HEAD for i in ${1//,/ } do version=$(pyenv latest --known $i) - pyenv install $version + pyenv install $version --verbose done chmod 777 /builds/worker/.pyenv/shims pyenv rehash