Repo for testing docker registry
Generate the self signed certs to run
Follow the official guide
Create the user to authenticate
Follow the official guide
docker run -d -p 5000:5000 --restart=always --name registry -v `pwd`/auth:/auth -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd -v `pwd`/certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key registry:2.6.2
docker run -d -p 443:443 --restart=always --name registry -v `pwd`/auth:/auth -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd -v `pwd`/certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key -e REGISTRY_HTTP_ADDR=0.0.0.0:443 -v /registry:/var/lib/registry registry:2.6.2
docker run -d -p 443:443 --restart=always --name registry -v `pwd`/certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key -e REGISTRY_HTTP_ADDR=0.0.0.0:443 -v /registry:/var/lib/registry registry:2.6.2
docker run -d -p 443:443 --restart=always --name registry -v `pwd`/certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key -e REGISTRY_HTTP_ADDR=0.0.0.0:443 -v /registry:/var/lib/registry -e REGISTRY_STORAGE_MAINTENANCE_READONLY='enabled: true' registry:2.6.2
Documentation says that the Environment variable should be REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED=true
, but it fails every time you start the registry.
Found in a PR that the way to do it if you don't have any other maintenance value in the Environment variables is like this REGISTRY_STORAGE_MAINTENANCE_READONLY='enabled: true'
docker-compose up -d
docker run -d -p 5000:5000 --restart=always --name registry -v `pwd`/config.yml:/etc/docker/registry/config.yml registry:2.6.2
docker run -d -p 443:443 --restart=always --name registry -v pwd
/config.secure.yml:/etc/docker/registry/config.yml -v pwd
/auth:/auth -v pwd
/certs:/certs -v /registry:/var/lib/registry registry:2.6.2
docker run -d -p 443:443 --restart=always --name registry -v pwd
/config.airgapped.yml:/etc/docker/registry/config.yml -v pwd
/auth:/auth -v pwd
/certs:/certs -v /registry:/var/lib/registry registry:2.6.2
docker login myregistrydomain.com:5000
docker logout myregistrydomain.com:5000