How to create a new docker image from a running container on Amazon?

user462794 picture user462794 · May 17, 2017 · Viewed 19.9k times · Source

Here is my problem:

I have a task running a Docker image on Amazon ECS but I would like to make a new Docker image from the running instance of the container.

I see the id of the instance on Amazon ECS; I have made an AMI but I would like to make a new docker image that I can pull from Amazon.

Any ideas?

Regards and thanks.

Answer

Renato Coutinho picture Renato Coutinho · Aug 24, 2018

To create a image from container execute the command below:

docker commit hw_container hw_image