标签:from master cond arch configure git alt user 网站
镜像的结构:registry_name/repository_name/image_name:tag_name
例如:docker.io/library/alpine:3.10.1
登录hub.docker.com Web界面注册账号
[root@progs docker]# docker login docker.io
Login with your Docker ID to push and pull images from Docker Hub. If you don‘t have a Docker ID, head over to https://hub.docker.com to create one.
Username: biaobes
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
[root@progs docker]#
awk -F‘"‘ ‘/"auth"/{print $(NF-1)}‘ /root/.docker/config.json |base64 -d
Name, shorthand | Default | Description |
---|---|---|
--all , -a |
Show all images (default hides intermediate images) | |
--digests |
Show digests | |
--filter , -f |
Filter output based on conditions provided | |
--format |
Pretty-print images using a Go template | |
--no-trunc |
Don’t truncate output | |
--quiet , -q |
Only show image IDs |
docker search alpine
# 搜索星号大于3000的alpine镜像
docker search alpine --filter=STARS=3000
docker pull alpine
docker pull alpine:3.10.1
docker images
docker images ls
docker tag b7b28af77ffe biaobes/alpine:3.10.1
将镜像推送到docker hub仓库
docker push biaobes/alpine:3.10.1
docker rmi biaobes/alpine:3.10.1
# docker rmi 镜像ID
docker rmi b7b28af77ffe
docker images | grep alpine
docker rmi -f b7b28af77ffe # -f 强制删除(包括标签及镜像)
docker rmi -f $(docker images -aq)
https://docs.docker.com/engine/reference/commandline/image/
标签:from master cond arch configure git alt user 网站
原文地址:https://www.cnblogs.com/binliubiao/p/14774188.html