Answers for "docker restart unless stopped to a container"

2

docker run restart always

$ docker run --restart=always redis
Posted by: Guest on July-25-2020
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 restart unless stopped to a container"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language