From 2b9e18426e2036fe47972804141fa65ea1961af7 Mon Sep 17 00:00:00 2001 From: renzaspiras Date: Tue, 4 Nov 2025 10:21:17 -0800 Subject: [PATCH] xrp --- .env.example | 13 +++--------- README.md | 51 +++++++++++++++++++++++++++++----------------- docker-compose.yml | 7 ------- 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/.env.example b/.env.example index 055ad36..8982f5f 100644 --- a/.env.example +++ b/.env.example @@ -7,16 +7,9 @@ REGISTRY_DATA_PATH=./data REGISTRY_LOG_LEVEL=info REGISTRY_DELETE_ENABLED=true -# Authentication (optional) -REGISTRY_AUTH_ENABLED=false -REGISTRY_AUTH_PATH=./auth -REGISTRY_AUTH_REALM=Registry Realm - -# TLS/SSL (optional) -REGISTRY_SECURED=false -REGISTRY_TLS_CERT_PATH=/certs/server.crt -REGISTRY_TLS_KEY_PATH=/certs/server.key -REGISTRY_TLS_PATH=./certs +# Note: Authentication and TLS are disabled by default +# To enable them, you'll need to mount custom config.yml +# See README.md for advanced configuration # UI Configuration REGISTRY_TITLE=Docker Registry diff --git a/README.md b/README.md index 652f52d..b44ea53 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,18 @@ In Coolify, set these environment variables as needed: - `REGISTRY_DELETE_ENABLED`: Allow image deletion (true/false) ### Security (Optional) -- `REGISTRY_AUTH_ENABLED`: Enable authentication (true/false) -- `REGISTRY_SECURED`: Enable HTTPS (true/false) -- `REGISTRY_TLS_CERT_PATH`: Path to TLS certificate -- `REGISTRY_TLS_KEY_PATH`: Path to TLS private key +For authentication and TLS, mount a custom `config.yml` file: +```yaml +version: 0.1 +auth: + htpasswd: + realm: basic-realm + path: /auth/htpasswd +http: + tls: + certificate: /certs/server.crt + key: /certs/server.key +``` ### UI Settings - `DELETE_IMAGES`: Allow deletion via UI (true/false) @@ -66,25 +74,30 @@ docker pull your-domain:5000/myimage curl http://your-domain:5000/v2/_catalog ``` -## Authentication (Optional) +## Advanced Configuration -To enable basic authentication: +For authentication, TLS, or other advanced features: -1. Set `REGISTRY_AUTH_ENABLED=true` -2. Create htpasswd file: -```bash -mkdir -p auth -docker run --rm -it httpd:alpine htpasswd -Bbn user password > auth/htpasswd +1. Create a custom `config.yml` file +2. Mount it to `/etc/docker/registry/config.yml` +3. Reference Docker Registry documentation for all options + +Example with auth and TLS: +```yaml +version: 0.1 +auth: + htpasswd: + realm: basic-realm + path: /auth/htpasswd +http: + tls: + certificate: /certs/server.crt + key: /certs/server.key +storage: + delete: + enabled: true ``` -## TLS/SSL (Optional) - -To enable HTTPS: - -1. Set `REGISTRY_SECURED=true` -2. Place certificates in `certs/` directory -3. Set `REGISTRY_TLS_CERT_PATH` and `REGISTRY_TLS_KEY_PATH` - ## Resource Usage - **RAM**: ~100-200MB total diff --git a/docker-compose.yml b/docker-compose.yml index bac6ca1..62fe89b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,17 +9,10 @@ services: - "5000" environment: - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=${REGISTRY_STORAGE_PATH:-/var/lib/registry} - - REGISTRY_AUTH=${REGISTRY_AUTH_ENABLED:-false} - - REGISTRY_AUTH_HTPASSWD_PATH=${REGISTRY_AUTH_PATH:-/auth/htpasswd} - - REGISTRY_AUTH_HTPASSWD_REALM=${REGISTRY_AUTH_REALM:-Registry Realm} - - REGISTRY_HTTP_TLS_CERTIFICATE=${REGISTRY_TLS_CERT_PATH:-} - - REGISTRY_HTTP_TLS_KEY=${REGISTRY_TLS_KEY_PATH:-} - REGISTRY_LOG_LEVEL=${REGISTRY_LOG_LEVEL:-info} - REGISTRY_STORAGE_DELETE_ENABLED=${REGISTRY_DELETE_ENABLED:-true} volumes: - ${REGISTRY_DATA_PATH:-./data}:/var/lib/registry - - ${REGISTRY_AUTH_PATH:-./auth}:/auth - - ${REGISTRY_TLS_PATH:-./certs}:/certs networks: - registry-network