How do you create a new Docker image for an existing container including all changes done to the container?
Experience Level: Junior
Tags: DockerDocker CLI
Answer
docker commit <container-id> <username/new-image-name>
Related Docker job interview questions
How do you delete a stopped Docker contaienr?
DockerDocker CLI JuniorHow do you save a Docker container to Docker Hub?
DockerDocker CLI JuniorHow do you kill a Docker container?
DockerDocker CLI JuniorHow do you stop a Docker container?
DockerDocker CLI JuniorHow do you start a Docker container?
DockerDocker CLI Junior