首页 > 其他 > 详细

docker常用命令

时间:2020-09-26 18:19:36      阅读:40      评论:0      收藏:0      [点我收藏+]
docker
docker run hello-world
docker search mysql
docker pull mysql:5.7.31
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi mysql:latest
docker run -itd --name mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root mysql:5.7.31
docker ps -a -q
mysql -h localhost -u root -p
netstat -aon | findstr "3306"


docker pull centos:centos7
docker run -itd --name centos-test centos:centos7
docker images
docker run -itd --privileged=true -v /D/:/soft --name centos-test centos:centos7
docker exec -it centos-test /bin/bash
docker stop e25788288ed5
docker stop centos-test
docker container ls -all
docker container rm centos-test
docker commit faf3cbb69fd5 centos:centos7.1
docker run -itd --privileged=true -v /D/:/soft --name centos-test.1 centos:centos7.1
docker exec -it centos-test.1 /bin/bash
docker commit faf3cbb69fd5 centos:centos7.2

 

docker常用命令

原文:https://www.cnblogs.com/kaishan1990/p/13734347.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!