We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65e016f commit 39d19a0Copy full SHA for 39d19a0
stop_demo/Dockerfile
@@ -0,0 +1,6 @@
1
+FROM alpine:latest
2
+
3
+RUN apk update && apk add bash
4
+COPY traptest.sh /
5
6
+CMD ["/traptest.sh"]
stop_demo/traptest.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+trap "echo Received SIGTERM > /dev/stderr" SIGTERM
+trap "echo Received SIGINT > /dev/stderr" SIGINT
+trap "echo Received SIGHUP > /dev/stderr" SIGHUP
+trap "echo Received SIGQUIT > /dev/stderr" SIGQUIT
+echo "Started with PID $$"
7
8
+while : # This is the same as "while true".
9
+do
10
+ sleep 0.1 # This script is not really doing anything.
11
+ wait
12
+done
0 commit comments