Dockerfile CMD - There can only be one.
Regardless of current or previously configure docker image, CMD can only be executed once.
For example, let's say you use image PARENT_IMAGE_DOCKER and it uses a CMD to build this image. If you build on top of PARENT_IMAGE_DOCKER and call it CHILD_IMAGE_DOCKER, you are still stuck with running / configuring a single CMD.
Image builder needs to be careful. The work around for this is to use a script (mountdb.script) which gets called and the runs whatever scripts that PARENT_IMAGE_DOCKER requires.
You can see some samples here (Notice on line 36, I called .\start.ps1 - which is what the image used to run.
Comments