Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue with SIGTERM not being propagated #14

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.11-slim-bullseye

ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
RUN chmod +x /tini

RUN apt-get update && apt-get install -y \
socat \
jq \
Expand All @@ -14,4 +17,4 @@ COPY bash-init.sh /bash-init.sh

ENV BASH_ENV=/bash-init.sh

ENTRYPOINT ["/bin/bash", "-l", "-c"]
ENTRYPOINT ["/tini", "-g", "--", "/bin/bash", "-c"]
11 changes: 11 additions & 0 deletions bash-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

set -euo pipefail

echoerr() { echo "$@" 1>&2; }

echoerr "Porla is starting up..."
echoerr "Executing: $BASH_EXECUTION_STRING"

exit() {
echoerr "Porla is shutting down..."
}

trap exit SIGINT SIGTERM

function to_bus () {
bus="$1"

Expand Down
Loading