Docker使用时遇到的一些问题札记

编程入门 行业动态 更新时间:2024-10-09 02:29:46

Docker使用时遇到的一些问题<a href=https://www.elefans.com/category/jswz/34/1753535.html style=札记"/>

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使用时遇到的一些问题札记

本文发布于:2024-02-07 01:21:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1752196.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:札记   Docker

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!