--docker images Display a list of local images --- a Show all images --- q Display the image ID ---- Digests Display a summary of images ---- no-trunc Display detailed information of the image
--docker run [options] images [command] [args] Create a new container and start it ---- name: Specify the name of the container --d: Background execution --i: interactive, used with t --t: Set up a temporary terminal --P: Random port --p: Specify port - ip:hostPost:containePort - ip::containePort - hostPort:containePort - caontainePort
--Container end command --exit: Stop the container --Ctrl + p + q: Stop the temporary terminal. Do not stop the container.
--Start container --docker start [container ID or container name] --docker restart [container ID or container name]
--Container Stop --docker start [container ID or container name]
--Forced termination of container --docker kill [container ID or container name]
--Delete the stopped container --docker rm [container ID or container name] --Multiple deletion - docker rm -f $(docker ps -a -p) - docker ps -a -q | xargs docker rm
--docker run -d [images] run in background --docker logs -t -f --tail [Container ID] - t time - f fresh --tail What number is displayed
--docker top Container ID Display the process inside the container --docker inspect Container ID Display detailed information about Nobel inside the container
--docker attach container ID --docker exec -it container ID bin/bash --docker exec -it container ID shell command
--docker cp container ID: container internal path path
Recommended Posts