How to create new docker image based on existing image?

Let’s say you have a container bd91ca3ca3c8 running, and you want to create a new image after you made changes in the container. Generating another image will allow you to preserve your changes.

In that case you can run:

docker commit -p -a "author_here" -m "your_message" bd91ca3ca3c8 name_of_new_image

-p pauses the container while commit command is building the new image.

-a allows you to supply author information of the new image.

-m allows you to add a comment just as in the Git.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)