Creating Base Docker Images
Creating your base Docker image is actually straightforward. Just as we used the docker commit
command previously to create an image from a running container, we can also create an image from a system or server we have originally been running our applications on. We need to remember that creating a base image still needs to remain small and lightweight. It is not simply a matter of moving existing applications running on existing servers over to Docker.
We could use the system we are specifically working on, but if you are using a production server, the image could actually be pretty big. If you have a small virtual machine you would think is perfect for a base image, you could use the following steps to create a base image from it. Similar to the docker commit
command, this can be used for any system you can access.
Exercise 3.03: Creating Your Base Docker Images
The following exercise will use the basic-app
image we are currently running and...