Guest User

Untitled

a guest
Oct 19th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. registry:
  2. restart: always
  3. image: registry:2
  4. ports:
  5. - 5000:5000
  6. environment:
  7. REGISTRY_HTTP_TLS_CERTIFICATE: /certs/server-cert.pem
  8. REGISTRY_HTTP_TLS_KEY: /certs/server-key.pem
  9. REGISTRY_AUTH: htpasswd
  10. REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
  11. REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
  12. volumes:
  13. - /data/docker-registry:/var/lib/registry
  14. - /certs/docker-registry:/certs
  15. - /auth/docker-registry:/auth
  16.  
  17. [root@dev-machine conf.d]# httpd -v
  18. Server version: Apache/2.4.6 (CentOS)
  19. Server built: Jun 27 2018 13:48:59
  20.  
  21. <VirtualHost *:443>
  22. ServerName dev-machine.com
  23. ServerAlias www.dev-machine.com
  24.  
  25. ErrorLog logs/dev-machine.com-error_log
  26. CustomLog logs/dev-machine.com-access_log common
  27.  
  28. SSLEngine on
  29. SSLCertificateFile /certs/docker-registry/server-cert.pem
  30. SSLCertificateKeyFile /certs/docker-registry/server-key.pem
  31.  
  32. Header set Host "dev-machine.com"
  33. RequestHeader set X-Forwarded-Proto "https"
  34.  
  35. ProxyRequests off
  36. ProxyPreserveHost on
  37.  
  38. ProxyPass /registry http://127.0.0.1:5000/
  39. ProxyPassReverse /registry http://127.0.0.1:5000/
  40.  
  41. <Location /registry>
  42. Order deny,allow
  43. Allow from all
  44.  
  45. AuthName "Registry Authentication"
  46. AuthType basic
  47. AuthUserFile "/auth/htpasswd"
  48. Require valid-user
  49. </Location>
  50. </VirtualHost>
  51.  
  52. izio@1z10:~$ docker login https://dev-machine.com/registry
  53. Username: user
  54. Password:
  55. 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