harbor/make/photon/registry/entrypoint.sh
Xavier Duthil 280c8272f8
Use exec in all components' entrypoints
Use the exec Bash command so that the final running application becomes
the container’s PID 1. This allows the application to receive any Unix
signals sent to the container, in accordance with
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#entrypoint

Currently, SIGTERM signals sent by kubernetes are not passed to the
executed binary.

Signed-off-by: Xavier Duthil <xavier.duthil@corp.ovh.com>
2021-03-05 15:00:25 +01:00

14 lines
362 B
Bash

#!/bin/sh
set -e
# The directory /var/lib/registry is within the container, and used to store image in CI testing.
# So for now we need to chown to it to avoid failure in CI.
# if [ -d /var/lib/registry ]; then
# chown 10000:10000 -R /var/lib/registry
# fi
/home/harbor/install_cert.sh
exec /usr/bin/registry_DO_NOT_USE_GC serve /etc/registry/config.yml