Docker common commands, container commands

1. Basic theory
insert image description here
insert image description here

2. Create and start the container
insert image description here
insert image description here
insert image description here

3. Delete the container
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
Give the container an alias
insert image description here
insert image description here
Start the container
insert image description here

insert image description here
Restart the container
from 3 minutes to 6 seconds
insert image description here
Stop the container
insert image description here
insert image description here
insert image description here

remove stopped containers
insert image description here
insert image description here
insert image description here

4. Important container commands

insert image description here
insert image description here
insert image description here
insert image description here

Below, because zzyy is printed every 2s, the background container is not launched
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here

insert image description here
Tell you all the structural details of the container in the format of json string

insert image description here
insert image description here
insert image description here
/bin/bash can be omitted

insert image description here
Fight cattle across the mountain, do it outside, and get the results directly.
insert image description here
insert image description here
5.

insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/wangyuhong2267/article/details/104187489