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>
This commit is contained in:
Xavier Duthil 2021-03-05 15:00:22 +01:00
parent 4c2e698af8
commit 280c8272f8
No known key found for this signature in database
GPG Key ID: 40271B72604B5D32
6 changed files with 6 additions and 8 deletions

View File

@ -5,6 +5,4 @@ set -e
/home/chart/install_cert.sh
#Start the server process
/home/chart/chartm
set +e
exec /home/chart/chartm

View File

@ -4,4 +4,4 @@ set -e
/harbor/install_cert.sh
/harbor/harbor_core
exec /harbor/harbor_core

View File

@ -4,4 +4,4 @@ set -e
/harbor/install_cert.sh
/harbor/harbor_exporter
exec /harbor/harbor_exporter

View File

@ -4,4 +4,4 @@ set -e
/harbor/install_cert.sh
/harbor/harbor_jobservice -c /etc/jobservice/config.yml
exec /harbor/harbor_jobservice -c /etc/jobservice/config.yml

View File

@ -10,4 +10,4 @@ set -e
/home/harbor/install_cert.sh
/usr/bin/registry_DO_NOT_USE_GC serve /etc/registry/config.yml
exec /usr/bin/registry_DO_NOT_USE_GC serve /etc/registry/config.yml

View File

@ -4,4 +4,4 @@ set -e
/home/scanner/install_cert.sh
/home/scanner/bin/scanner-trivy
exec /home/scanner/bin/scanner-trivy