Docker常用操作备忘

从主机复制到容器sudo docker cp host_path containerID:container_path

从容器复制到主机sudo docker cp containerID:container_path host_path

(docker cp /home/data 40e2e36ee05d:/home)

从docker镜像进入docker容器里面:

docker run -it guohaoyu110/ubuntu:v1.0 /bin/bash

启动docker容器:

docker ps -a //得到之前的已经停止的和没停止的container

docker start fe938c563d4f

docker exec -it fe938c563d4f bash

然后就可以进去了!

===========================

-进入已经创立的docker镜像?

-docker ps得到CONTAINER ID 

-然后docker attach ...

 system prune -a 删除暂时不用的docker镜像

 

设置docker和桌面的共享文件夹, docker主机和宿主机之间共享文件夹

https://blog.csdn.net/xiangxianghehe/article/details/77131962

https://jingyan.baidu.com/article/295430f1e6bdb00c7f00506e.html

 

 https://blog.csdn.net/xinaml/article/details/77573644

Linux : E: Unable to locate package XXX  

遇到这种问题,通常是由于镜像源没有更新下。 
更新命令如下:

sudo apt-get update


Docker 容器创建镜像并提交到Docker hub

 https://blog.csdn.net/xinaml/article/details/77573644
posted @ 2019-06-12 23:02  女王公园的八神  阅读(140)  评论(0编辑  收藏  举报