## Description This docker compose run registry on docker ## Install ```bash mkdir -p /home/docker/certs mkdir -p /home/docker/registry-ui/conf mkdir -p /home/docker/registry-ui/data ``` Set ***password:*** in file `config.yml` and copy in `/home/docker/registry-ui/conf/` ```bash sudo cp config.yml /home/docker/registry-ui/conf/ ``` ## Certificats Copy crt, key and CA cert files on `/home/docker/certs/` ## Run ### docker ```bash docker run --network=host -d -p 8000:8000 -v /home/docker/certs/gmolabCA.crt:/etc/ssl/certs/ca-certificates.crt:ro -v ./config.yml:/opt/config.yml:ro quiq/registry-ui:latest ``` Teh optin `--network` tell to docker to use /etc/hosts instead DNS ### docker compose ```bash docker compose up -d ``` ## Config apache ### http-registry-ui.conf ```bash # General setup for the virtual host ServerName registry-ui.gmolab.net ServerAlias registry-ui CustomLog logs/registry-ui_access_log common ErrorLog logs/registry-ui_error_log # redirect to https RewriteEngine on RewriteCond %{SERVER_NAME} =registry-ui [OR] RewriteCond %{SERVER_NAME} =registry-ui.gmolab.net RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] ``` ### https-registry-ui.conf ```bash # general setup for the virtual host ServerName registry-ui.gmolab.net ServerAlias registry-ui CustomLog logs/registry-ui_access_log common ErrorLog logs/registry-ui_error_log # ssl SSLEngine on SSLHonorCipherOrder on SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 SSLHonorCipherOrder on SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE- RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4 # enable HTTP/2, if available Protocols h2 http/1.1 # HTTP Strict Transport Security (mod_headers is required) (63072000 seconds) Header always set Strict-Transport-Security "max-age=63072000" # certificats SSLCertificateFile "/etc/httpd/auth/cert/gmolab.net.crt" SSLCertificateKeyFile "/etc/httpd/auth/cert/gmolab.net.key" SSLCertificateChainFile "/etc/httpd/auth/cert/gmolabCA.crt" # proxy SSLProxyEngine On ProxyPreserveHost On ProxyRequests off ProxyPass "/" "http://127.0.0.1:8000/" ProxyPassReverse "/" "http://127.0.0.1:8000/" ``` ## Sources https://medium.com/quiq-blog/docker-registry-ui-874c890d2c9b https://github.com/Quiq/registry-ui ## Changelog ### v1.0 - 2024-11-30 #### Added - initial version by [GMo](mailto:gilles.mouchet@gmail.com)