|
The real lesson they should learn is to not rely on running images and then using "docker commit" to turn it into an image, but instead to use proper image building tools. If you absolutely have to do it that way, be very deliberate about what you actually need. Don't run an SSH daemon, don't run cron, don't an SMTP daemon, don't run the suite of daemons that run on a typical Linux server. Only run precisely what you need to create the files that you need for a "docker commit". Each service that you run can potentially generate log files, lock files, temp files, named pipes, unix sockets and other things you don't want in your image. Taking a snapshot from a working, regular VM and using that as a docker image is one of the worst ways to built one. |