The below is my environment to use docker private registry.
- . Docker version 18.09.0
Client:
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:48:57 2018
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:16:44 2018
OS/Arch: linux/amd64
Experimental: false
- . Docker registry version : v2.7.0 (I am using docker registry image from docker hub.
- . Docker-compose version : 1.23.2
I have just made a simple docker private registry on local host machine(Ubuntu 16.04). When build a docker image and run it registry container, the below docker-compose.yml.
registry:
restart: always
image: registry:2
ports:
- 5000:5000
volumes:
- {my/data/path}:/var/lib/registry
While my docker private registry was running, I tried to push my test image and completed it successfully with the below message.
hansungkim@:~/HDD/nfs/v2x_2019/make_docker_image/docker_registry/data$ docker push localhost:5000/my-ubuntu:latest
The push refers to repository [localhost:5000/my-ubuntu]
3c6f8febc7b2: Pushed
c47259d2185a: Pushed
a79e4f3ff375: Pushed
94ae4bc46133: Pushed
latest: digest: sha256:f8794c548b9c4bc881dd0f6204e7b1bb61cf55f39deb6114617296f8e482b131 size: 1150
The below is a directory tree for docker registry data.
└── docker
└── registry
└── v2
├── blobs
│ └── sha256
│ ├── 86
│ │ └── 860140c5e05ae6e62f893bba5f4c8f332457aca9c2f0a9dd83094ea06b354dbd
│ │ └── data
│ ├── d2
│ │ └── d222a4da264e0b37d48b38c62b014a16ca5089ba478a3d7c9a0ce5d7db64fd07
│ │ └── data
│ ├── d4
│ │ └── d4452947e3faf4c9002596b6a9b84831f1412b731b893ddf623b206c523d5e86
│ │ └── data
│ ├── dc
│ │ └── dc25173478e95b766e8bc26944652b9baa87cbebb2d9d1d9d34b85303b9b2067
│ │ └── data
│ ├── f8
│ │ └── f8794c548b9c4bc881dd0f6204e7b1bb61cf55f39deb6114617296f8e482b131
│ │ └── data
│ └── fc
│ └── fc8aef08d7f5f3acb87daab04776b1c2df78d1097b3bf7e34b95b29ef8be0365
│ └── data
└── repositories
└── my-ubuntu
├── _layers
│ └── sha256
│ ├── 860140c5e05ae6e62f893bba5f4c8f332457aca9c2f0a9dd83094ea06b354dbd
│ │ └── link
│ ├── d222a4da264e0b37d48b38c62b014a16ca5089ba478a3d7c9a0ce5d7db64fd07
│ │ └── link
│ ├── d4452947e3faf4c9002596b6a9b84831f1412b731b893ddf623b206c523d5e86
│ │ └── link
│ ├── dc25173478e95b766e8bc26944652b9baa87cbebb2d9d1d9d34b85303b9b2067
│ │ └── link
│ └── fc8aef08d7f5f3acb87daab04776b1c2df78d1097b3bf7e34b95b29ef8be0365
│ └── link
├── _manifests
│ ├── revisions
│ │ └── sha256
│ │ └── f8794c548b9c4bc881dd0f6204e7b1bb61cf55f39deb6114617296f8e482b131
│ │ └── link
│ └── tags
│ └── latest
│ ├── current
│ │ └── link
│ └── index
│ └── sha256
│ └── f8794c548b9c4bc881dd0f6204e7b1bb61cf55f39deb6114617296f8e482b131
│ └── link
└── _uploads
37 directories, 14 files
After pushing my image, I wanted to check all of image status from _catalog. But I didn’t see it in docker registry path. It doesn’t exist in that path. If I’m missing anything to deploy a simple private registry, please let us know that.