Skip to content

Commit 03d1d44

Browse files
fix python versions
1 parent 49791c1 commit 03d1d44

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

Dockerfile

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,21 +106,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
106106
### PYTHON ###
107107

108108
ARG PYENV_VERSION=v2.5.5
109-
ARG PYTHON_VERSION=3.11.12
109+
ENV PYTHON_VERSIONS="3.11.12 3.10 3.12 3.13"
110110

111111
# Install pyenv
112112
ENV PYENV_ROOT=/root/.pyenv
113113
ENV PATH=$PYENV_ROOT/bin:$PATH
114-
ENV PYTHON_VERSIONS="3.10 3.11.12 3.12 3.13"
115114
RUN git -c advice.detachedHead=0 clone --branch "$PYENV_VERSION" --depth 1 https://github.com/pyenv/pyenv.git "$PYENV_ROOT" \
116115
&& echo 'export PYENV_ROOT="$HOME/.pyenv"' >> /etc/profile \
117-
&& echo 'export PATH="$$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"' >> /etc/profile \
116+
&& echo 'export PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"' >> /etc/profile \
118117
&& echo 'eval "$(pyenv init - bash)"' >> /etc/profile \
119118
&& cd "$PYENV_ROOT" \
120119
&& src/configure \
121120
&& make -C src \
122-
&& pyenv install "$PYTHON_VERSIONS" \
123-
&& pyenv global "$PYTHON_VERSION" \
121+
&& pyenv install $PYTHON_VERSIONS \
122+
&& pyenv global "${PYTHON_VERSIONS%% *}" \
124123
&& rm -rf "$PYENV_ROOT/cache"
125124

126125
# Install pipx for common global package managers (e.g. poetry)
@@ -164,9 +163,7 @@ RUN git -c advice.detachedHead=0 clone --branch "$NVM_VERSION" --depth 1 https:/
164163
&& nvm cache clear \
165164
&& npm cache clean --force || true \
166165
&& pnpm store prune || true \
167-
&& yarn cache clean || true \
168-
&& rm -rf /root/.cache/corepack /root/.npm /root/.pnpm-store /root/.cache/yarn
169-
166+
&& yarn cache clean || true
170167
### BUN ###
171168

172169
ARG BUN_VERSION=1.2.14
@@ -213,10 +210,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --pr
213210
&& . "$HOME/.cargo/env" \
214211
&& echo 'source $HOME/.cargo/env' >> /etc/profile \
215212
&& rustup toolchain install $RUST_VERSIONS --profile minimal --component rustfmt --component clippy \
216-
&& rustup default ${RUST_VERSIONS%% *} \
217-
&& rm -rf "$RUSTUP_HOME/downloads" "$RUSTUP_HOME/tmp" \
218-
"$CARGO_HOME/registry" "$CARGO_HOME/git"
219-
213+
&& rustup default ${RUST_VERSIONS%% *}
220214

221215
### RUBY ###
222216

0 commit comments

Comments
 (0)