Docker Management
There are different commands which will be very handy while using and managing docker containers.
Inspecting container or image
- Returns low-level information on Docker objects
docker inspect <container name>
docker inspect <image name>
- Let's inspect the
nginx:alpine
image
docker inspect nginx:alpine
Docker history
- Show the history of an image
docker history jess/htop
Stopping and removing container
- Let's run a nginx container
docker run --name dummynginx -d nginx:alpine
- Identify the container name or id using
docker ps
docker stop dummynginx
- To remove container, it has to be stopped. Then runt he below command
docker rm dummynginx