1
0
Fork 0

migrate registry service to s6-rc

This commit is contained in:
Daniel Wolf 2022-03-03 14:07:19 -05:00
parent 641c789bcd
commit d8c6665a67
Signed by: nephatrine
GPG Key ID: 59D70EC2E4AAB4D0
11 changed files with 25 additions and 18 deletions

View File

@ -26,8 +26,8 @@ docker run --rm -p 5000:5000 -it nephatrine/docker-registry:latest /bin/bash
## Docker Tags
- **nephatrine/docker-registry:testing**: Registry 2.7 / Alpine Edge
- **nephatrine/docker-registry:latest**: Registry 2.7 / Alpine Latest
- **nephatrine/docker-registry:testing**: Registry Main / Alpine Edge
- **nephatrine/docker-registry:latest**: Registry Main / Alpine Latest
## Configuration Variables

View File

@ -1,10 +0,0 @@
#!/usr/bin/with-contenv bash
if [[ ! -d /mnt/config/etc/registry ]]; then
s6-setuidgid guardian mkdir -p /mnt/config/etc/registry
fi
s6-setuidgid guardian cp -n /etc/registry/* /mnt/config/etc/registry/
if [[ ! -d ${REGISTRY_DATA_DIR} ]]; then
s6-setuidgid guardian mkdir -p ${REGISTRY_DATA_DIR}
fi

View File

@ -1 +0,0 @@
0 6 * * * /usr/local/bin/clean-registry --delete-untagged=true

View File

@ -1 +0,0 @@
/mnt/config/data/docker true guardian:users,1000:100 0644 0755

View File

@ -0,0 +1,3 @@
#!/bin/bash
export HOME=/mnt/config/home
/command/s6-setuidgid guardian /usr/bin/registry garbage-collect --delete-untagged=true /mnt/config/etc/registry/config.yml

View File

@ -0,0 +1,17 @@
#!/bin/bash
# Build Config
if [[ ! -d /mnt/config/etc/registry ]]; then
/command/s6-setuidgid guardian /bin/mkdir -p /mnt/config/etc/registry
fi
/command/s6-setuidgid guardian /bin/cp -n /etc/registry/* /mnt/config/etc/registry/
# Start Service
if [[ ! -d /mnt/config/data ]]; then
/command/s6-setuidgid guardian /bin/mkdir -p /mnt/config/data
fi
export HOME=/mnt/config/home
exec /command/s6-setuidgid guardian /usr/bin/registry serve /mnt/config/etc/registry/config.yml

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1 @@

View File

@ -1,2 +0,0 @@
#!/usr/bin/with-contenv sh
exec s6-setuidgid guardian /usr/bin/registry serve /mnt/config/etc/registry/config.yml

View File

@ -1,2 +0,0 @@
#!/usr/bin/with-contenv sh
/usr/bin/registry garbage-collect /mnt/config/etc/registry/config.yml $@