-
Notifications
You must be signed in to change notification settings - Fork 3
Docker Deep Dive: Docker Commands
docker --help | more
docker container -h
docker images -h
docker images ls -h
docker image pull $image_name
docker image inspect $image_id
-P : is for port mapping, -d : is to run container in the background
docker container run -P -d nginx
docker container inspect $container_id
docker container top $container_id
docker container stop $container_id
docker container start $container_id
docker container pause $container_id
docker container unpause $container_id
docker container logs $container_id
stats - Display a live stream of container(s) resource usage statistics
$ docker container stats 1017ff810803
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
1017ff810803 loving_brattain 0.00% 2.574MiB / 15.41GiB 0.02% 11.2kB / 1.27kB 279kB / 0B 2
docker container exec -it $container_id ls /bin/bash
Remove all stopped containers
docker container prune
docker container prune -f
____________________ Important
____________________
- attach vs exec - https://stackoverflow.com/questions/30960686/difference-between-docker-attach-and-docker-exec
- cmd vs entrypoint - https://stackoverflow.com/questions/21553353/what-is-the-difference-between-cmd-and-entrypoint-in-a-dockerfile
- How to detach - https://stackoverflow.com/questions/25267372/correct-way-to-detach-from-a-container-without-stopping-it
- run application in foreground - https://stackoverflow.com/questions/18861300/how-to-run-nginx-within-a-docker-container-without-halting
- STOPSIGNAL - https://stackoverflow.com/questions/50898134/what-does-docker-stopsignal-do
Container's World
- Essential Container Concepts
-
Components
-
Container Technology
-
Docker
-
Container Orchestration
- Docker Swarm
- Kubernetes
-
- Docker Quick Start
- Docker-Deep Dive