This commit is contained in:
2025-11-04 10:21:17 -08:00
parent 1a19f799bd
commit 2b9e18426e
3 changed files with 35 additions and 36 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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