Commit e8363b8c authored by BAIRE Anthony's avatar BAIRE Anthony

create a new registry image (derived from the official image)

(so that a default registry configuration is provided with the image)
parent 1936083c
...@@ -36,16 +36,13 @@ EOF ...@@ -36,16 +36,13 @@ EOF
install_secrets() install_secrets()
{ {
src=data/django/ro/certs/tokens.crt src=data/django/ro/certs/tokens.crt
dst=data/registry dst=data/registry/ro/certs/tokens.crt
if [ -f "$src" ] && [ -d "$dst" ] ; then if [ -f "$src" ] && [ -d "`dirname "$dst"`" ] && ! cmp -s "$src" "$dst" ; then
echo "Install tokens certificate as $dst/ro/tokens.crt" echo "Install tokens certificate as $dst/tokens.crt"
mkdir -p "$dst/ro" cp "$src" "$dst"
cp "$src" "$dst/ro/"
fig restart dev-registry fig restart dev-registry
fi fi
#TODO: remove
mkdir -p "$dst/rw/registry"
} }
# generate the factories # generate the factories
......
...@@ -58,19 +58,13 @@ services: ...@@ -58,19 +58,13 @@ services:
dev-registry: dev-registry:
container_name: dev-registry container_name: dev-registry
image: registry:2 build: registry
ports: ports:
- "5000:5000" - "5000:5000"
volumes: volumes:
- "/data/dev/registry:/vol" - "/data/dev/registry:/vol"
environment: environment:
REGISTRY_LOG_LEVEL: "debug" REGISTRY_LOG_LEVEL: "info"
REGISTRY_AUTH: "token"
REGISTRY_AUTH_TOKEN_REALM: "http://0.0.0.0:8008/jwt/auth"
REGISTRY_AUTH_TOKEN_SERVICE: "allgo_registry"
REGISTRY_AUTH_TOKEN_ISSUER: "allgo_oauth"
REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE: "/vol/ro/tokens.crt"
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: "/vol/rw/registry"
networks: [dev] networks: [dev]
# CONTROLLER # CONTROLLER
......
FROM registry:2
COPY files/. /
# apart from REGISTRY_LOG_LEVEL these environment variables should not be
# overriden at runtime
ENV \
REGISTRY_AUTH="token" \
REGISTRY_AUTH_TOKEN_REALM="https://0.0.0.0/jwt/auth" \
REGISTRY_AUTH_TOKEN_SERVICE="allgo_registry" \
REGISTRY_AUTH_TOKEN_ISSUER="allgo_oauth" \
REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE="/vol/ro/certs/tokens.crt" \
REGISTRY_LOG_LEVEL="info" \
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY="/vol/rw/registry"
EXPOSE 5000
#!/bin/sh
mkdir -p "/vol/ro/certs"
mkdir -p "/vol/rw/registry"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment