Difference between docker -d and doing ctrl-p+ctrl-q after launching interactively?
docker -d more efficient than simply first running interactively with
docker -i -t and then detaching with ctrl-p + ctrl-q?
On my production server, I need to change some config settings after running the container. I could commit those config changes and start a new container from this image, but I’d rather just keep it in the first container and detach. Any dangers to this approach?
One Solution collect form web for “Difference between docker -d and doing ctrl-p+ctrl-q after launching interactively?”
Having all your configurations in the Dockerfile and running
docker -d is more efficient. Even if it means creating multiple Dockerfiles with unique configurations for each container.
The downside with configuring the container then detaching each time is that, its the manual way of doing things, which defeats the purpose of the Dockerfile. Also, it will take more time to replicate your container on another environment.
You can also explore using Docker Environment Variables, or Reading a configuration file from a Docker Volume to make your setup more dynamic.