I’m just starting to learn Docker and I have set-up a private registry per https://docs.docker.com/registry/deploying/. All is fine except when I try to change the actual storage location from the default to some other file location. I want/need to use a local file system .
If I do:
docker run -d -p 5000:5000 --restart=always --name csiareg
-v pwd
/certs:/certs
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/mydomain.crt
-e REGISTRY_HTTP_TLS_KEY=/certs/mydomain.key
registry:2
then a docker push. The files seem to be placed in /var/lib/docker. But all works fine
If I do this to direct to another directory it fails:
docker run -d -p 5000:5000 --restart=always --name csiareg
-v pwd
/data:/var/lib/registry
-e REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data
-v pwd
/certs:/certs
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/mydomain.crt
-e REGISTRY_HTTP_TLS_KEY=/certs/mydomain.key
registry:2
When I do a docker push I get a : Received unexpected HTTP status: 503 Service Unavailable
Do a docker ps and container is running but I guess something failed. Not sure where to look and why this did not work.
Any thoughts?