Skip to content

Commit 91d3f15

Browse files
authored
Use ARG instead of ENV for build time only environment variable
1 parent f121a0d commit 91d3f15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM alpine:${ALPINE_VERSION}
55
RUN apk add --no-cache git python3 python3-dev py3-pip py3-setuptools build-base
66

77
# build wheels in a build stage
8-
ENV VIRTUAL_ENV=/opt/venv
8+
ARG VIRTUAL_ENV=/opt/venv
99
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
1010

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

26-
ENV VIRTUAL_ENV=/opt/venv
26+
ARG VIRTUAL_ENV=/opt/venv
2727
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
2828

2929
RUN python3 -m venv ${VIRTUAL_ENV}

0 commit comments

Comments
 (0)