Skip to content

Commit c00ca3b

Browse files
committed
chore: update Dockerfile
* use uv Docker image * bump Python patch versions JIRA: TRIVIAL risk: low
1 parent 7dd1a5c commit c00ca3b

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# (C) 2021 GoodData Corporation
22
ARG PY_TAG
3+
FROM ghcr.io/astral-sh/uv:0.10 AS uv
34
FROM python:${PY_TAG}
45

56
ARG PY_TAG
67
ARG ENV_TAG
7-
ARG UV_VERSION=0.10.0
88

99
# tox defines all python targets, makefile recognizes TEST_ENVS and forces
1010
# tox to execute only tests for installed python
1111
ENV TEST_ENVS=${ENV_TAG}
1212

13+
# copy uv binary from official image; version is guarded by required-version in pyproject.toml
14+
COPY --from=uv /uv /usr/local/bin/uv
15+
1316
# install make and gosu
14-
# install uv using pip
15-
# UV_VERSION should match pyproject.toml [tool.uv] required-version (currently ~=0.10.0)
1617
ENV GOSU_VERSION=1.14
1718
RUN set -x \
1819
&& apt-get update \
1920
&& apt-get install -y --no-install-recommends make curl gnupg \
20-
&& pip install --no-cache-dir "uv==${UV_VERSION}" \
2121
&& curl -sSLo /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
2222
&& curl -sSLo /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
2323
&& export GNUPGHOME="$(mktemp -d)" \
@@ -40,14 +40,11 @@ WORKDIR /data
4040
COPY pyproject.toml uv.lock ./
4141

4242
# Install tox and tox-uv as system packages so they're available globally
43-
# This matches the original behavior where tox was installed via pip
4443
# We use uv pip install to install packages from the tox dependency group in pyproject.toml
4544
# by reading from the lock file which ensures consistent versions
46-
# Reinstall uv after pip install to ensure correct version (uv pip install may install a different version)
4745
# Clean up dependency files after installation to reduce image size
4846
RUN set -x \
4947
&& uv pip install --system --group tox \
50-
&& pip install --no-cache-dir --force-reinstall "uv==${UV_VERSION}" \
5148
&& rm -f pyproject.toml uv.lock \
5249
&& true
5350

ci_tests.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ endif
3737
# Targets to build docker file for each python version
3838
.PHONY: test-ci-py310-build
3939
test-ci-py310-build: Dockerfile
40-
docker build --build-arg "PY_TAG=3.10.15-slim-bookworm" --build-arg "ENV_TAG=py310" -t python-sdk:py310 .
40+
docker build --build-arg "PY_TAG=3.10.19-slim-bookworm" --build-arg "ENV_TAG=py310" -t python-sdk:py310 .
4141

4242
.PHONY: test-ci-py311-build
4343
test-ci-py311-build: Dockerfile
44-
docker build --build-arg "PY_TAG=3.11.10-slim-bookworm" --build-arg "ENV_TAG=py311" -t python-sdk:py311 .
44+
docker build --build-arg "PY_TAG=3.11.14-slim-bookworm" --build-arg "ENV_TAG=py311" -t python-sdk:py311 .
4545

4646
.PHONY: test-ci-py312-build
4747
test-ci-py312-build: Dockerfile
48-
docker build --build-arg "PY_TAG=3.12.6-slim-bookworm" --build-arg "ENV_TAG=py312" -t python-sdk:py312 .
48+
docker build --build-arg "PY_TAG=3.12.12-slim-bookworm" --build-arg "ENV_TAG=py312" -t python-sdk:py312 .
4949

5050
.PHONY: test-ci-py313-build
5151
test-ci-py313-build: Dockerfile
52-
docker build --build-arg "PY_TAG=3.13.1-slim-bookworm" --build-arg "ENV_TAG=py313" -t python-sdk:py313 .
52+
docker build --build-arg "PY_TAG=3.13.12-slim-bookworm" --build-arg "ENV_TAG=py313" -t python-sdk:py313 .
5353

5454
.PHONY: test-ci-py314-build
5555
test-ci-py314-build: Dockerfile
56-
docker build --build-arg "PY_TAG=3.14.0-slim-bookworm" --build-arg "ENV_TAG=py314" -t python-sdk:py314 .
56+
docker build --build-arg "PY_TAG=3.14.3-slim-bookworm" --build-arg "ENV_TAG=py314" -t python-sdk:py314 .
5757

5858
# test-ci target triggers unit tests for each requested environment
5959
.PHONY: test-ci

0 commit comments

Comments
 (0)