Create an Image of Docker Container

Published by Aryan on

Docker Container

Hello Folks. I am back again with another simple tutorial.

While we are making changes in container, we need to make an image out it so that it can be copied to different system. Following is the process to make an image and later on create container out of that image.

List the running containers

$ sudo docker container ls

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
462d8a700300        ubuntu:bionic       "bash"              28 hours ago        Up About an hour                        boring_wescoff

Next is to create the image. Image name is formatted as “space”/”name”:”tag”

$ sudo docker commit 462d8a700300 apex/webserver:1.0

List the new image

$ sudo docker images

REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
apex/webserver      1.0                 08715679d2b5        3 seconds ago       777MB

And we are done. Try it yourself.


Hey Friends, Thank you for visiting my blog and spending some of your precious time reading it. Myself Aryan who works with a variety of computer technologies. This blog is a write-up of my understanding of various topics after reading different materials about it. I hope that it helps you in some way. Enjoy reading and feel free to connect with me.


Leave a Reply

Your email address will not be published. Required fields are marked *