container
containers
check version and info
1 | docker --version |
start/stop restart
1 | sudo systemctl start docker |
run a container from images
1 | sudo docker run -d -p 7890:80 --name container's_name image |
-d : run in detached mode;
-p : port mapping point;
—name : specify the container’s name
list containers and images
1 | docker ps //list the containers that running |
stop or remove container
1 | docker stop name_container |
start a container
restart first:
1 |
|
if start with interactive terminal:
1 |
|
if not:
1 | docker exec -it <container ID> /bin/bash # with interactive terminal |
docker command line homepage
click here to come back to docker command line homepage.
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.





