O'Reilly logo

Mastering Docker - Third Edition by Scott Gallagher, Russ McKendrick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using an existing container

The easiest way to build a base image is to start off by using one of the official images from the Docker Hub. Docker also keeps the Dockerfile for these official builds in their GitHub repositories. So there are at least two choices you have for using existing images that others have already created. By using the Dockerfile, you can see exactly what is included in the build and add what you need. You can then version control that Dockerfile if you want to change or share it later.

There is another way to achieve this; however, it is not recommended or considered to be good practice, and I would strongly discourage you from using it.

I would only use this method during a prototyping phase to check that the commands ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required