Dockerfile - ARG instruction (argument)

About

ARG defines argument that can be passed by the build command line

Example

  • Defines an argument in your docker file
ARG VERSION=<Default Value>
# Output the value for the sake of the example
RUN echo $VERSION
  • Pass a new value via the build command
docker build --build-arg VERSION=1.0 .

Powered by ComboStrap