DockerHub
https://hub.docker.com/repository/docker/mixiaochao/scratch-example/general
docker login
docker build --tag mixiaochao/scratch-example:latest .
# 推送push
docker image push mixiaochao/scratch-example:latest
# 不知道构建镜像的过程
Docker Registry
Docker Registry is distributed as an image from Docker Hub
本地托管
# 拉取registry镜像
docker image pull registry:2
docker container run -d -p 5000:5000 --name registry registry:2
# 镜像的推送和拉取
docker image pull alpine
# 更改repository name
docker image tag alpine localhost:5000/localalpine
# 推送到本地托管Docker Registry
docker image push localhost:5000/localalpine
docker image ls
# 拉回镜像
docker image rm alpine localhost:5000/localalpine
docker image pull localhost:5000/localalpine
docker image ls
# 停止和移除Docker Registry --volumes, -v 删除与容器关联的卷
docker container stop registry
docker container rm -v registry
启动 Docker Registry 时有很多选择和注意事项 最重要的就是存储
Docker Trusted Registry
Docker Trusted Registry ( DTR )是商业Docker 企业版Enterprise Edition( Docker EE )附带的组件
第三方注册表(Registry)
Red Hat Container Catalog
Red Hat Quay
GitHub、Amazon Web Services、Microsoft Azure 和 Google Cloud提供的服务
MicroBadger
管理容器的工具
已弃用