Docker learning-common instructions

[1] Start one or more containers that have been stopped

docker start recogition #启动一个容器名为recogition的容器

[2] Stop a running container

docker stop recogition #停止一个容器名为recogition的容器

[3] Restart the container

docker restart recogition #重启一个容器名为recogition的容器

[4] List containers

docker ps -a  #显示所有的容器,包括未运行的

[5] Enter the container: (Start a bash interactive terminal by specifying the parameters.)

docker exec -it 【容器ID or 容器name】 /bin/bash

[6] docker rm: delete one or more containers.

docker rm recogition

[7] Create a new image from the container.

docker commit container01 image01

[8] Create a new container and run a command

docker run -it --gpus all --name detect -p 10249:10249 -v /mnt/ltl/pinyin-detect/:/pinyin-detect nvidia/cuda:10.2-cudnn7-devel-ubuntu16.04

[9] Kill a running container

docker kill recogition

[10] docker pause: Pause all processes in the container.

docker pause CONTAINER [CONTAINER...]
docker unpause CONTAINER [CONTAINER...]

Guess you like

Origin blog.csdn.net/qq_28057379/article/details/111045571