Skip to content

Commit

Permalink
Run dumb-init with --single-child
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Muru Paenga <[email protected]>
  • Loading branch information
meringu committed Nov 4, 2024
1 parent f23ab63 commit f66775b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit f66775b

Please sign in to comment.