札记"/>
Docker使用时遇到的一些问题札记
还没有系统学习Docker,抽出时间还是要系统学习学习的,目前,还是先记录记录遇到的一些问题:
1:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@gatk-test ~]# docker images
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
解决方式:
[root@gatk-test ~]# service docker start
2:想要从一个机器上拷贝docker镜像到另一个机子,应该如何导出docker镜像,并再次导入呢?
#docker镜像导出
[root@2pang images]docker images
[root@2pang images]docker save e4ae643c9055 > /home/data/docker/images/test-docker-image.tar
[root@2pang images]scp /home/data/docker/images/test-docker-image.tar root@192.168.0.10:/data/docker/images/test-docker-image.tar
#docker镜像导入与启动步骤
[root@2tong images]# docker load < /data/docker/images/test-docker-image.tar
0f5ff0cf6a1c: Loading layer [==================================================>] 126MB/126MB
Loaded image ID: sha256:e4ae643c90550602dc4a110917d5905a289fd6485d09386bcc670b4837fd2de4
[root@2tong images]# docker tag e4ae643c9055 2tong/test:latest
[root@2tong images]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
2tong/test latest e4ae643c9055 2 months ago 1.21GB
[root@2tong images]# docker run -itd 2tong/test
dc8aa35f81c74455dfb811c998397f1c592a50dd3052a242656bf6fde8b88882
更多推荐
Docker使用时遇到的一些问题札记
发布评论