Docker Images

Docker Images

Docker Images

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed docker system commands.

In this blog post, we will discuss docker images. We will also create a docker image using Dockerfile.

Prerequisite for this demo:

  • One AWS EC2 instance with Linux 2 AMI and internet access.
  • Docker

What is docker image?

An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image which is based on the Ubuntu image but installs the Apache web server and your application, as well as the configuration details needed to make your application run. You might create your own images or you might only use those created by others and published in a registry.

What is Dockerfile?

To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast when compared to other virtualization technologies.

Docker Images Demo:

Docker Images

Docker Images

Hope you have enjoyed this article. In the next blog post, we will discuss docker network.

To get more details on docker, please refer below docker documentation


Leave a Reply

Close Menu