Skip to content

Commit

Permalink
Use ARG instead of ENV for build time only environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Mar 24, 2024
1 parent f121a0d commit 91d3f15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM alpine:${ALPINE_VERSION}
RUN apk add --no-cache git python3 python3-dev py3-pip py3-setuptools build-base

# build wheels in a build stage
ENV VIRTUAL_ENV=/opt/venv
ARG VIRTUAL_ENV=/opt/venv
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}

RUN python3 -m venv ${VIRTUAL_ENV}
Expand All @@ -23,7 +23,7 @@ FROM alpine:${ALPINE_VERSION}
# install python, git, bash, mercurial
RUN apk add --no-cache git git-lfs python3 py3-pip py3-setuptools bash docker mercurial

ENV VIRTUAL_ENV=/opt/venv
ARG VIRTUAL_ENV=/opt/venv
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}

RUN python3 -m venv ${VIRTUAL_ENV}
Expand Down

0 comments on commit 91d3f15

Please sign in to comment.