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
install_secrets()
{
src=data/django/ro/certs/tokens.crt
dst=data/registry
dst=data/registry/ro/certs/tokens.crt
if [ -f "$src" ] && [ -d "$dst" ] ; then
echo "Install tokens certificate as $dst/ro/tokens.crt"
mkdir -p "$dst/ro"
cp "$src" "$dst/ro/"
if [ -f "$src" ] && [ -d "`dirname "$dst"`" ] && ! cmp -s "$src" "$dst" ; then
echo "Install tokens certificate as $dst/tokens.crt"
cp "$src" "$dst"
fig restart dev-registry
fi
#TODO: remove
mkdir -p "$dst/rw/registry"
}
# generate the factories
......
......@@ -58,19 +58,13 @@ services:
dev-registry:
container_name: dev-registry
image: registry:2
build: registry
ports:
- "5000:5000"
volumes:
- "/data/dev/registry:/vol"
environment:
REGISTRY_LOG_LEVEL: "debug"
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"
REGISTRY_LOG_LEVEL: "info"
networks: [dev]
# 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