Replace ENV with ARG at Dockerfile for vars that should not be persisted

Vars declared via the ENV mechanism will also be present at run time, polluting
somewhat the environment.  Since both PIXIECORE_{SANDBOX,CONTEXT} are only
needed at build time, using the ARG form is a cleaner solution.

See ¹ for reference.

¹: https://docs.docker.com/engine/reference/builder/#arg
This commit is contained in:
pancho horrillo 2017-06-16 07:59:39 +02:00 committed by Dave Anderson
parent 7ffd9d9f64
commit b8b3aeb641

View File

@ -2,8 +2,8 @@ FROM alpine:3.6
MAINTAINER David Anderson <dave@natulte.net>
ENV PIXIECORE_SANDBOX /tmp/sandbox
ENV PIXIECORE_CONTEXT "$PIXIECORE_SANDBOX"/context
ARG PIXIECORE_SANDBOX=/tmp/sandbox
ARG PIXIECORE_CONTEXT="$PIXIECORE_SANDBOX"/context
COPY . "$PIXIECORE_CONTEXT"