Skip to content

Commit 268fe29

Browse files
authored
Clear PIP_INDEX_URL at the end of the build (#1694)
1 parent 8acd88f commit 268fe29

36 files changed

Lines changed: 109 additions & 1 deletion

File tree

src/almalinux/10/helix/amd64/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ ENV VIRTUAL_ENV=/home/helixbot/.vsts-env
5050
RUN python3 -m venv $VIRTUAL_ENV
5151
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
5252
COPY --from=venv --chown=helixbot /venv $VIRTUAL_ENV
53+
54+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
55+
ENV PIP_INDEX_URL=

src/almalinux/9/helix/amd64/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ RUN python3 -m venv $VIRTUAL_ENV \
5454
&& ${VIRTUAL_ENV}/bin/pip install --upgrade pip setuptools
5555
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
5656
COPY --from=venv --chown=helixbot /venv $VIRTUAL_ENV
57+
58+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
59+
ENV PIP_INDEX_URL=

src/alpine/3.23/amd64/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,6 @@ RUN azureEnv="/usr/local/share/azure-cli-env" \
8181

8282
# Add label for bring your own node in azure devops
8383
LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node"
84+
85+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
86+
ENV PIP_INDEX_URL=

src/alpine/3.23/helix/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ ENV VIRTUAL_ENV=/home/helixbot/.vsts-env
5858
RUN python3 -m venv $VIRTUAL_ENV
5959
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
6060
COPY --from=venv --chown=helixbot /venv $VIRTUAL_ENV
61+
62+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
63+
ENV PIP_INDEX_URL=

src/alpine/3.24/amd64/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,6 @@ RUN azureEnv="/usr/local/share/azure-cli-env" \
8181

8282
# Add label for bring your own node in azure devops
8383
LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node"
84+
85+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
86+
ENV PIP_INDEX_URL=

src/alpine/3.24/helix/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ ENV VIRTUAL_ENV=/home/helixbot/.vsts-env
5858
RUN python3 -m venv $VIRTUAL_ENV
5959
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
6060
COPY --from=venv --chown=helixbot /venv $VIRTUAL_ENV
61+
62+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
63+
ENV PIP_INDEX_URL=

src/alpine/edge/helix/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ ENV VIRTUAL_ENV=/home/helixbot/.vsts-env
5858
RUN python3 -m venv $VIRTUAL_ENV
5959
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
6060
COPY --from=venv --chown=helixbot /venv $VIRTUAL_ENV
61+
62+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
63+
ENV PIP_INDEX_URL=

src/azurelinux/3.0/helix/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ ENV VIRTUAL_ENV=/home/helixbot/.vsts-env
5555
RUN python3 -m venv $VIRTUAL_ENV
5656
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
5757
COPY --from=venv --chown=helixbot /venv $VIRTUAL_ENV
58+
59+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
60+
ENV PIP_INDEX_URL=

src/azurelinux/3.0/net10.0/crossdeps-builder/amd64/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,6 @@ ENV PATH="/opt/llvm/bin:$PATH"
118118
# Obtain arcade scripts used to build rootfs
119119
RUN git config --global user.email builder@dotnet-buildtools-prereqs-docker && \
120120
git clone --depth 1 --single-branch https://github.com/dotnet/arcade /scripts
121+
122+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
123+
ENV PIP_INDEX_URL=

src/azurelinux/3.0/net11.0/crossdeps-builder/amd64/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,6 @@ ENV PATH="/opt/llvm/bin:$PATH"
115115
# Obtain arcade scripts used to build rootfs
116116
RUN git config --global user.email builder@dotnet-buildtools-prereqs-docker && \
117117
git clone --depth 1 --single-branch https://github.com/dotnet/arcade /scripts
118+
119+
# Clear PIP_INDEX_URL since it contains a short-lived token that should not persist in the final image
120+
ENV PIP_INDEX_URL=

0 commit comments

Comments
 (0)