@@ -26,17 +26,29 @@ RUN set -x \
2626 && rm -rf /var/lib/apt/lists/* \
2727 && true
2828
29- # install tox
30- ENV PYTHON_TOX_VERSION=4.30.0
31- ENV PYTHON_TOX_UV_VERSION=1.28.0
32- # install uv
33- ENV PYTHON_UV_VERSION=0.9.5
29+ # install uv from Astral's Docker image
30+ # UV_VERSION should match pyproject.toml [tool.uv] required-version (currently 0.9.5)
31+ ARG UV_VERSION=0.9.5
32+ COPY --from=ghcr.io/astral-sh/uv:${UV_VERSION} /uv /usr/local/bin/uv
33+ RUN chmod +x /usr/local/bin/uv
34+
35+ # Set working directory before copying files
36+ WORKDIR /data
37+
38+ # copy dependency files - these will be available at build time
39+ # At runtime, the directory will be mounted, but uv will use the lock file
40+ # to ensure consistent dependencies
41+ COPY pyproject.toml uv.lock ./
42+
43+ # Install tox and tox-uv as system packages so they're available globally
44+ # This matches the original behavior where tox was installed via pip
45+ # We use uv pip install to install packages from the tox dependency group in pyproject.toml
46+ # by reading from the lock file which ensures consistent versions
3447RUN set -x \
35- && pip3 install uv==${PYTHON_UV_VERSION} tox==${PYTHON_TOX_VERSION} tox-uv==${PYTHON_TOX_UV_VERSION} \
48+ && uv pip install --system --only-group tox \
3649 && true
3750
3851COPY .docker/entrypoint.sh /entrypoint.sh
39- WORKDIR /data
4052
4153LABEL image_name="GoodData Python SDK test image with python, tox and make"
4254# LABEL maintainer="TigerTeam <tiger@gooddata.com>"
0 commit comments