hpc-cloud/roles/dockerregistry/files/dockerregistry.service
Egon Rijpkema a058cadcf5 Added a dockerregistry docker.
We should roll out our dockers from here.

Changed password

(I failed to save it somewhere)

Reencrypted htpasswd using docker's htpasswd

see: 33a74ba9af/registry/part-3.md
2017-05-09 09:17:04 +02:00

22 lines
932 B
Desktop File

[Unit]
Description=Docker Registry container with certs and basic auth
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=on-failure
ExecStartPre=-/usr/bin/docker stop %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker pull registry:2
ExecStart=/usr/bin/docker run -d -p 5000:5000 --restart=always --name %n \
-v /srv/dockerregistry/auth:/auth -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd -v /srv/dockerregistry/certs:/certs \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/docker-registry.hpc.service.rug.nl.crt \
-e REGISTRY_HTTP_TLS_KEY=/certs/docker-registry.hpc.service.rug.nl.key \
-e REGISTRY_HTTP_SECRET=jahNoh2teev0 registry:2
[Install]
WantedBy=multi-user.target