Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by www.thorsten-hans.com #
 
PREVIOUS NEXT
Tagged: #enter #stopped #docker #container
ADD COMMENT
Topic
Name
9+7 =