Is it possible to create a docker image of present running docker instances?

81 Views Asked by At

I am new to docker and I have instantiated a strapi container which needs a mongoDB container to be run first. I am currently running this in AWS ECS where I configured the task definition to have both the containers and linked.

I am now just wondering if I can make a docker image out of the existing container system. So in future, I could maybe just post this new image to dockerhub or ECR and run in ECS without any additional configuration like Environment variables or links or multiple containers in single task defintion.

Any ideas would be helpful.

1

There are 1 best solutions below

0
On

you can create docker image by

docker commit (container-name)