From eb2d368d5b8ea55b060eeb0bdf26b8004239fc50 Mon Sep 17 00:00:00 2001 From: Henry Muru Paenga Date: Wed, 11 Sep 2024 11:33:19 +1200 Subject: [PATCH] Run dumb-init with --single-child --- docker-entrypoint.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 18a8f6ceaf..a0673441fe 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/dumb-init /bin/sh +#!/bin/sh set -e # Modified: https://github.com/hashicorp/docker-consul/blob/2c2873f9d619220d1eef0bc46ec78443f55a10b5/0.X/docker-entrypoint.sh @@ -54,4 +54,8 @@ else echo "No files found in /docker-entrypoint.d/, skipping" fi -exec "$@" +# Runs dumb init in single child mode. By default dumb init will forward +# interrupts to all child processes, causing Terraform to cancel and Terraform +# providers to exit uncleanly. We forward the signal to Atlantis only, allowing +# it to trap the interrupt, and exit gracefully. +exec /usr/bin/dumb-init --single-child "$@"