Author Archives: SandeepSingh DBA

About SandeepSingh DBA

Hi, I am working in IT industry with having more than 10 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Create a new image from stopped container in Docker

Commit a new image with stopped container in Docker

Check the stopped container in Docker

#docker ps -a

sunny@Oracle1:/etc$ docker ps -a

CONTAINER ID   IMAGE         COMMAND     CREATED       STATUS                     PORTS     NAMES

eeb55035fffe   orcl2-image   "/bin/sh"   3 hours ago   Exited (0) 3 seconds ago             fervent_herschel


Create an image from the stopped container:

#docker commit <imageid> <new image name>


#docker commit <imagename> <new image name>

sunny@Oracle1:/etc$ docker commit eeb55035fffe image-oracle


Verify the created image:

sunny@Oracle1:/etc$ docker images

REPOSITORY                                       TAG         IMAGE ID       CREATED          SIZE

image-oracle                                     latest      fead993590eb   27 seconds ago   15.8GB

orcl2-image                                      latest      e28a1ae656c2   3 hours ago      15.8GB

Run the image for testing purpose:

sunny@Oracle1:/etc$ docker run -it image-oracle 



sh-4.2$ ls