baixiaoshi 2020-06-04
下载镜像doecker pull
查看下载的镜像docker images
启动镜像docker start -p -it 镜像ID /bin/bash
删除镜像docker rmi 镜像ID
端口号映射docker -p 本地端口:容器端口
手动二进制安装docker:
1.下载二进制压缩包、解压后复制到/usr/bin
2.准备docker service文件
#scp /lib/systemd/system/docker/service /bin/systemd/system/docker.socket
/lib/systemd/system/containerd.service 172.31.6.102:/lib/systemd/system/
#systemctl unmask containerd
#systemctl unmask docker
#systemctl unmask docker.socket
#systemctl enable docker #systemctl enable containerd #systemctl start docker #systemctl start containerd
/var/lib/docker #看公司需求,有些时候需要单独挂载一块数据盘,来单独存储容器数据