fix: simplify Docker registry configuration by removing unnecessary authentication settings
This commit is contained in:
parent
1ef9726314
commit
a7ac8004d4
@ -1,24 +1,13 @@
|
|||||||
services:
|
services:
|
||||||
registry:
|
registry:
|
||||||
image: registry:2
|
image: registry:2
|
||||||
|
container_name: docker_registry
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- REGISTRY_AUTH=htpasswd
|
|
||||||
- REGISTRY_AUTH_HTPASSWD_REALM=Registry
|
|
||||||
# We point this to a path that we will 'fake' inside the container
|
|
||||||
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
|
|
||||||
- REGISTRY_STORAGE_DELETE_ENABLED=true
|
- REGISTRY_STORAGE_DELETE_ENABLED=true
|
||||||
- REGISTRY_HTTP_SECRET=something_very_random_and_long
|
- REGISTRY_HTTP_SECRET=temporary_secret_123
|
||||||
# We pass the raw hash string here
|
volumes:
|
||||||
- HT_CONTENTS=${REGISTRY_AUTH_HTPASSWD_CONTENTS}
|
- /mnt/appdata/docker_registry/data:/var/lib/registry
|
||||||
# Create the file on the fly before the registry starts
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
mkdir -p /auth
|
|
||||||
echo "${HT_CONTENTS}" | base64 -d > /auth/htpasswd
|
|
||||||
exec bin/registry serve /etc/docker/registry/config.yml
|
|
||||||
networks:
|
networks:
|
||||||
- proxy-net
|
- proxy-net
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user