Forget to specify arg in Docker build today as well as today. Moreover, since it is a base Docker image, you have to rebuild multiple container images. ..
For those who have the same experience as me. Make sure you get an error when building Docker.
■ Method Dockerfile ARG MY_VARIABLE RUN test -n "$ MY_VARIABLE" ← If the length of MY_VARIABLE is 0 like this, the command will fail.
■ Remarks Useless layers will increase If possible, I would like an option that can officially make an error in the Docker build.
■ Reference https://stackoverflow.com/questions/38438933/how-to-make-a-build-arg-mandatory-during-docker-build https://www.atmarkit.co.jp/ait/articles/1807/05/news041.html
Recommended Posts