fix: refactor command syntax for Docker registry configuration

This commit is contained in:
Nathan 2026-04-17 15:53:32 -04:00
parent 53e43508f3
commit 1479eb8bcd

View File

@ -12,8 +12,13 @@ services:
# We pass the raw hash string here # We pass the raw hash string here
- HT_CONTENTS=${REGISTRY_AUTH_HTPASSWD_CONTENTS} - HT_CONTENTS=${REGISTRY_AUTH_HTPASSWD_CONTENTS}
# Create the file on the fly before the registry starts # Create the file on the fly before the registry starts
command: > command:
sh -c "mkdir -p /auth && echo '$$HT_CONTENTS' > /auth/htpasswd && exec bin/registry serve /etc/docker/registry/config.yml" - sh
- -c
- |
mkdir -p /auth
echo "${HT_CONTENTS}" > /auth/htpasswd
exec bin/registry serve /etc/docker/registry/config.yml
volumes: volumes:
- /mnt/appdata/docker_registry/data:/var/lib/registry - /mnt/appdata/docker_registry/data:/var/lib/registry
networks: networks: