Answers for "docker service accidentally stopped container"

1

docker remove all stopped

$ docker rm $(docker ps --filter status=exited -q)
Posted by: Guest on June-22-2021
0

enter a stopped docker container

# Commit the stopped image
docker commit 0dfd54557799 debug/ubuntu

# now we have a new image
docker images list
REPOSITORY    TAG     IMAGE ID       CREATED         SIZE  
debug/ubuntu  <none>  cc9db32dcc2d   2 seconds ago   64.3MB


# create a new container from the "broken" image
docker run -it --rm --entrypoint sh debug/ubuntu
# inside of the container we can inspect - for example, the file system
$ ls /app
App.dll
App.pdb
App.deps.json
# CTRL+D to exit the container

# delete the container and the image
docker image rm debug/ubuntu
Posted by: Guest on July-12-2021

Code answers related to "docker service accidentally stopped container"

Browse Popular Code Answers by Language