Monday, March 18, 2019

Create docker image from running container



So, what is a docker container?

It is running(executing) docker image.

You made some changes in the docker container - maybe by yum installation / by editing some files.
You can create a new image out of this specific docker container .

How ?

// get docker id
# docker ps
<docker id>

// create new image out of the above docker container
# docker commit <docker id>  <new_name>

// check the resulting image
# docker images | grep <new_name>

No comments:

Post a Comment