...

/

Creating a Simple Image

Creating a Simple Image

Up until now, we have been using ready-made images from Docker Hub. In this lesson you will learn how to make your first image.

We'll cover the following...

As we saw earlier, containers are created from images. Up until now, we’ve been using images created by others. It’s high time we learned how to create our own images. Inside our images, we can stuff our programs and their dependencies so that multiple containers can be created from those images and live happily ever after.

Creating a Simple Image

A Docker image is created using the docker build command and a Dockerfile file. The Dockerfile file contains instructions on how the image should be built.

The Dockerfile file can have any name. Naming it Dockerfile makes it easier for others to understand its purpose when they see that file in your project. It ...