Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- registry:
- restart: always
- image: registry:2
- ports:
- - 5000:5000
- environment:
- REGISTRY_HTTP_TLS_CERTIFICATE: /certs/server-cert.pem
- REGISTRY_HTTP_TLS_KEY: /certs/server-key.pem
- REGISTRY_AUTH: htpasswd
- REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
- volumes:
- - /data/docker-registry:/var/lib/registry
- - /certs/docker-registry:/certs
- - /auth/docker-registry:/auth
- [root@dev-machine conf.d]# httpd -v
- Server version: Apache/2.4.6 (CentOS)
- Server built: Jun 27 2018 13:48:59
- <VirtualHost *:443>
- ServerName dev-machine.com
- ServerAlias www.dev-machine.com
- ErrorLog logs/dev-machine.com-error_log
- CustomLog logs/dev-machine.com-access_log common
- SSLEngine on
- SSLCertificateFile /certs/docker-registry/server-cert.pem
- SSLCertificateKeyFile /certs/docker-registry/server-key.pem
- Header set Host "dev-machine.com"
- RequestHeader set X-Forwarded-Proto "https"
- ProxyRequests off
- ProxyPreserveHost on
- ProxyPass /registry http://127.0.0.1:5000/
- ProxyPassReverse /registry http://127.0.0.1:5000/
- <Location /registry>
- Order deny,allow
- Allow from all
- AuthName "Registry Authentication"
- AuthType basic
- AuthUserFile "/auth/htpasswd"
- Require valid-user
- </Location>
- </VirtualHost>
- izio@1z10:~$ docker login https://dev-machine.com/registry
- Username: user
- Password:
- Error response from daemon: login attempt to https://dev-machine/v2/ failed with status: 404 Not Found
Add Comment
Please, Sign In to add comment