How to pass arguments to a Dockerfile?
You are looking for --build-arg
and the ARG
instruction. These are new as of Docker 1.9.
Check out this document for reference. This will allow you to add ARG arg
to the Dockerfile
and then build with
docker build --build-arg arg=2.3 .