diff --git a/Dockerfile b/Dockerfile index db9e7b4f4c..c5fb61a828 100644 --- a/Dockerfile +++ b/Dockerfile @@ -167,7 +167,8 @@ RUN apk add --no-cache \ bash~=5 \ openssh~=9 \ dumb-init~=1 \ - gcompat~=1 + gcompat~=1 \ + coreutils-env~=9 # Set the entry point to the atlantis user and run the atlantis command USER atlantis diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 18a8f6ceaf..4f307e1666 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,4 +1,10 @@ -#!/usr/bin/dumb-init /bin/sh +#!/usr/bin/env -S dumb-init --single-child /bin/sh + +# dumb-init is run 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. + set -e # Modified: https://github.com/hashicorp/docker-consul/blob/2c2873f9d619220d1eef0bc46ec78443f55a10b5/0.X/docker-entrypoint.sh