安装:yum -y install docker-ce 开启:systemctl start docker 开机自启:systemctl enable docker docker version docker:docker run hello-world 查看帮助: docker | docker image 拉取镜像:docker pull mariadb Dockerfile:名字不能修改 # StudyDocker from scratch add hello / cmd ["/hello"] docker history ID docker build -t gochaochao/hello-world . docker run -it centos 交互式,进入此系统 docker container ls (-a) docker container ls -aq 列出ID docker rm ID / docker rm $(docker container ls -aq) 删除 docker container ls -f "state=exited" -q //没运行的 docker exec -it ID /bin/bash //进入容器交互 docker run -d -p 9000:80 --name=web nginx //端口映射,后台 --network none/bridge/host // 无网络,安全/桥接/共享宿主机命名空间 -e redius-host=39.……

Continue reading