I want to notice that I forgot to specify arg when building Docker

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

I want to notice that I forgot to specify arg when building Docker
Problems I was addicted to when building the digdag environment with docker
Pointcut Expression I want to specify more than one
I want to set devise_parameter_sanitizer individually when I create two devises
I want to randomly generate information when writing test code
[Docker] List of errors that occurred when building the environment
docker-compose.yml when you want to keep mysql running with docker
I want to convert characters ...
Know the convenience of Docker (-compose) now (information list that I referred to when using it)
Links I want to help when JSF doesn't work at all
I want to use swipeback on a screen that uses XLPagerTabStrip
The story of Collectors.groupingBy that I want to keep for posterity
I want to avoid OutOfMemory when outputting large files with POI
[Docker] Magic command when you want to wipe out none image
Swift: I want to chain arrays
I want to use FormObject well
I want to convert InputStream to String
I want to docker-compose up Next.js!
My.cnf configuration problem that I was addicted to when I was touching MySQL 8.0 like 5.7
Glassfish tuning list that I want to keep for the time being
I want to know the JSP of the open portlet when developing Liferay
My memorandum that I want to make ValidationMessages.properties UTF8 in Spring Boot
I want to get the IP address when connecting to Wi-Fi in Java
I want to display an error message when registering in the database