docker镜像部分常用命令
查看本地镜像
- docker images
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
REPOSITORY:表示镜像的仓库源
TAG:镜像的标签
IMAGE ID:镜像ID
CREATED:镜像创建时间
SIZE:镜像大小
寻找合适镜像
- 可以使用docker search命令查找
eg:
docker search centos
docker search httpd
拉取镜像
- docker image pull
:
eg:
docker image pull centos:latest
出现问题
- 问题一
Get https://registry-1.docker.io/v2/: net/http: request canceled 报错
- 问题二
Error response from daemon: Get https://index.docker.io/v1/search?q=mysql&n=25: net/http: TLS handshake timeout
- 问题三
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout
- 解决方法
eg:
docker image pull hub.daocloud.io/centos:latest
docker image pull pee6w651.mirror.aliyuncs.com/library/centos:latest