标签:use ant blank details 常用 efault got ubunt run
1.常用命令和操作
(1)参考:https://shimo.im/docs/FnT8B0CdmlkiD1mO/read
(2)补充
进入容器是exec,退出容器用exit
2.镜像下载慢,加速
(1)docker pull daocloud.io/library/mysql
参考:https://blog.csdn.net/bb74747/article/details/82534993
(2)靠谱镜像源
daocloud.io/library:下载mysql很快,下载ubuntu就很慢了
阿里云:下载ubuntu很快
也可参考:https://www.cnblogs.com/yuya670/p/12931207.html
阿里云镜像库配置:https://www.jianshu.com/p/1a4025c5f186
3.获取管理权限
(1)报错:
docker pull registry.docker-cn.com/library/mysql
Using default tag: latest
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/images/create?fromImage=registry.docker-cn.com%2Flibrary%2Fmysql&tag=latest: dial unix /var/run/docker.sock: connect: permission denied
(2)因为需要获取权限
sudo groupadd docker #添加docker用户组
sudo gpasswd -a $USER docker #将登陆用户加入到docker用户组中
newgrp docker #更新用户组
参考:https://blog.csdn.net/icodestechnology/article/details/97170540
4. docker状态转换
参考:
标签:use ant blank details 常用 efault got ubunt run
原文地址:https://www.cnblogs.com/sybil-hxl/p/12945511.html