Home > Back-end >  Docker common commands
Docker common commands

Time:01-06

Docker images'

Docker tag 32422 b834e49 172.21.3.20:5000/centos4dm faultdm: v0.1
172.21.3.20:5000/centos4dm. Faultdm: v0.1 172.21.3.20 here: 5000 is the address of the warehouse said, centos4dm faultdm is the name of the mirror, v0.1 is the version number

Docker save -o centos4dm. Fault. Tar 299212 b2fbd1

Docker import centos4dm. Tar

Docker build - t 172.21.3.20:5000/centos4dm.net resdm: v1.0.


Docker push 172.21.3.20:5000/centos4dm.net resdm: v1.0

Remove the mirror
Docker rmi fd5a715de262

Through the docker run run directly mirror and into/bin/bash, can view the file in a container, such as:
Docker run - I - t 172.21.3.20:5000/centos4dm.net resdm: v1.0/bin/bash
Can use the -v parameter, mount directory
Docker run - v/opt/iMC/common/conf:/opt/iMC/common/conf - v/opt/iMC/server/conf:/opt/iMC/server/conf - d - I - t 28 f5fa8058c8 "/bin/bash"

1. The Docker ps
Check the running docker:
[root @ centos73-12 server] # docker ps

2. The Docker stop
Stop the running docker

3. The Docker exec
Through the docker exec can log on to the running of the mirror: unaffected
[root @ centos73-12 server] # docker exec - it 26 bc294f5eba "/bin/bash"
[root @ faultdm - 4069766530 - s2f75 bin] #
4. The docker attach
Into a container, if the container is running in the process of directly into the
Docker attach e08dbf2eee4d -- into container

5. Pod and modify the content inside the commit
Docker ps | grep syslog
168 docker commit 0 c3741bfa899 syslog_spark: test
Docker 169 images | grep syslog
170 docker tag b022046e5be matrix-registry.h3c.com: 8088/platt/itom - syslog - statistics: 9.0.6.1.0 6.1.0 - test4
Docker 171 push matrix-registry.h3c.com: 8088/platt/itom - syslog - statistics: 9.0.6.1.0 6.1.0 - test4


  • Related