* Kill contaner 

- docker-compose

- sudo killall containerd-shim

- sudo docker-compose down

* Remove all image

- sudo docker image rm -f $(sudo docker image ls -q)

* Command docker

- docker exec -it <container-name-or-id> bash

- docker rm $(docker ps -aq) (remove all container)

- docker start id_container
- docker attach id_container
- docker exec id-container command
- docker commit id-container name:latest
- docker save --output name-image.tar
- docker load -i name-image.tar
- docker tag id-image name:tag (đặt tên và version cho image)
- docker run -it -v pathHost:pathContainer imageid
- docker volume create nameDisk
- docker volume inspect nameDisk
- docker run -it --name "name container" --mount source=nameDisk, target=pathContainer imageid
- docker volume create --opt device=pathHost --opt type=none --opt o=bind nameDisk
   + docker run -it -v diskName:pathContainer imageId
- docker inspect id-container
- docker nnetwork create --driver bridge network1
- docker network connect name-network id-container
- docker stats

- kill container, remove images, container, volume, network

+ docker rm $(docker ps -a -q)
+ docker rmi $(docker images -q)
+ docker kill $(docker ps -q)
+ docker volume rm $(docker volume ls -q)
+ docker volume prune
+ docker network prune

- restart docker

+ sudo systemctl daemon-reload
+ sudo systemctl restart docker

admin