sudo docker images REPOSITORY TAG IMAGE ID CREATED SIZE registry 2 2e2f252f3c88 4 weeks ago 33.3MB
Docker 镜像命名规则
完整的image名称:registry.domain.com/name/base:latest
registry.domain.com image 所在服务器地址
name 命名空间
base 具体名字
latest 版本号
验证本地私有镜像
本地存在一个ubuntu:16.04 的镜像
1 2 3 4 5
root@pprt-s1:/home/docker# docker images REPOSITORY TAG IMAGE ID CREATED SIZE registry 2 2e2f252f3c88 4 weeks ago 33.3MB ubuntu 16.04 b9e15a5d1e1a 5 weeks ago 115MB
添加一个新的taglocalhost:5000/ubuntu:16.04
1 2 3 4 5 6 7
root@pprt-s1:/home/docker# docker tag ubuntu:16.04 localhost:5000/ubuntu:16.04 root@pprt-s1:/home/docker# docker images REPOSITORY TAG IMAGE ID CREATED SIZE registry 2 2e2f252f3c88 4 weeks ago 33.3MB ubuntu 16.04 b9e15a5d1e1a 5 weeks ago 115MB localhost:5000/ubuntu 16.04 b9e15a5d1e1a 5 weeks ago 115MB
# For nginx < 1.3.9 # FYI: Chunking requires nginx-extras package on DebianWheezy and some Ubuntu versions # See chunking http://wiki.nginx.org/HttpChunkinModule # Replacewith appropriate values where necessary
upstream docker-registry { server localhost:5000; }
# uncomment if you want a 301 redirect for users attempting to connect # on port 80 # NOTE: docker client will still fail. This is just for convenience # server { # listen *:80; # server_name my.docker.registry.com; # return301https://$server_name$request_uri; # }
server { listen 443; server_name docker.os.pprt.net;