docker build --build-arg VERSION=1.0 -t myapp .

Category: Docker

docker build --build-arg VERSION=1.0 -t myapp .

Pass a build argument to the Dockerfile

Passes a build-time variable (like a version number) into the Dockerfile's ARG instructions.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.