Skip to content

Commit 942ab96

Browse files
authored
Use awk to pin python major.minor version (#2151)
1 parent 41d0c3f commit 942ab96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

images/docker-stacks-foundation/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ RUN set -x && \
131131
rm -rf /tmp/bin/ && \
132132
# Pin major.minor version of python
133133
# https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#preventing-packages-from-updating-pinning
134-
mamba list --full-name 'python' | tail -1 | tr -s ' ' | cut -d ' ' -f 1,2 | sed 's/\.[^.]*$/.*/' >> "${CONDA_DIR}/conda-meta/pinned" && \
134+
mamba list --full-name 'python' | awk 'END{sub("[^.]*$", "*", $2); print $1 " " $2}' >> "${CONDA_DIR}/conda-meta/pinned" && \
135135
mamba clean --all -f -y && \
136136
fix-permissions "${CONDA_DIR}" && \
137137
fix-permissions "/home/${NB_USER}"

0 commit comments

Comments
 (0)