Skip to content

Commit 88ba5cc

Browse files
committed
Move env variable block to the highest possible layer
1 parent 48a0d14 commit 88ba5cc

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Dockerfile

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@ LABEL version="5.0.0rc1"
66
ENV APPDIR /app
77
ENV LANG C.UTF-8
88

9-
# Versions, and expose labels for external usage
10-
ENV PYTHON_VERSION_27=2.7.15 \
11-
PYTHON_VERSION_36=3.6.8 \
12-
PYTHON_VERSION_37=3.7.2 \
13-
CONDA_VERSION=4.5.12
14-
LABEL python.version_27=$PYTHON_VERSION_27 \
15-
python.version_36=$PYTHON_VERSION_36 \
16-
python.version_37=$PYTHON_VERSION_37 \
17-
conda.version=$CONDA_VERSION
18-
199
# UID and GID from readthedocs/user
2010
RUN groupadd --gid 205 docs \
2111
&& useradd --gid 205 -m --uid 1005 docs
@@ -124,6 +114,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \
124114
USER docs
125115
WORKDIR /home/docs
126116

117+
# Versions, and expose labels for external usage
118+
ENV PYTHON_VERSION_27=2.7.15 \
119+
PYTHON_VERSION_36=3.6.8 \
120+
PYTHON_VERSION_37=3.7.2 \
121+
CONDA_VERSION=4.5.12
122+
LABEL python.version_27=$PYTHON_VERSION_27 \
123+
python.version_36=$PYTHON_VERSION_36 \
124+
python.version_37=$PYTHON_VERSION_37 \
125+
conda.version=$CONDA_VERSION
126+
127127
# Install Conda
128128
RUN curl -O https://repo.continuum.io/miniconda/Miniconda2-${CONDA_VERSION}-Linux-x86_64.sh \
129129
&& bash Miniconda2-${CONDA_VERSION}-Linux-x86_64.sh -b -p /home/docs/.conda/ \

0 commit comments

Comments
 (0)