Use parameters and variables in Dockerfile using command line

Опубликовано: 30 Май 2026
на канале: The Machine Learning Engineer
206
7

shorts
Use parameters and variables in Dockerfile using command line
complete context in the related video:    • Docker basics: How to create my first Dock...  

command:
--build-arg user_app=test
with this parameter we pass the argument user_test with the value test to the build docker process. In your dockerFile you need to use ARG user_app to receive the value of the argument and use it only during the building process.
docker build --pull --rm --build-arg user_app=test -f Dockerfile_var -t dockervideo:latest .