Skip to content

Commit d1af9a2

Browse files
committed
🐛 Fix missing PYTHONVERSION In Image.
Pin Python version global for all future projects
1 parent a1a9f41 commit d1af9a2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ COPY known_hosts /root/.ssh/known_hosts
4545
COPY --chown=${USERNAME}:${USERNAME} known_hosts /home/${USERNAME}/.ssh/known_hosts
4646

4747
# Install uv
48+
ARG PYTHONVERSION
4849
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
4950
ENV UV_CACHE_DIR=/var/cache/uv \
5051
UV_PYTHON_CACHE_DIR=/var/cache/uv/python \
5152
UV_LINK_MODE=copy
5253
RUN set -x; mkdir -p $UV_CACHE_DIR && mkdir -p $UV_PYTHON_CACHE_DIR
53-
RUN --mount=type=cache,target=/var/cache/uv,sharing=locked uv python install ${PYTHONVERSION} --default
54+
RUN --mount=type=cache,target=/var/cache/uv,sharing=locked set -x; uv python install ${PYTHONVERSION} --default && uv python pin --global ${PYTHONVERSION}
5455

5556
RUN apt autoremove --purge -y && apt clean -y
5657

0 commit comments

Comments
 (0)