From 9e0d4434fe292b6ee0b6a88afbb1762c00c9af90 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Mon, 9 Jan 2023 21:03:05 +0100 Subject: [PATCH] docker-entrypoint: bash strict mode --- docker-entrypoint.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 0fa7de8..cb0470a 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/bash + +set -euo pipefail # exit on error, error on undef var, error on any fail in pipe (not just last cmd); add -x to print each cmd; see gist bash_strict_mode.md # Remove chromium profile lock. # When running in docker and then killing it, on the next run chromium displayed a dialog to unlock the profile which made the script time out. @@ -26,4 +28,4 @@ echo "VNC is running on port $VNC_PORT (no password!)" websockify -D --web "/usr/share/novnc/" $NOVNC_PORT "localhost:$VNC_PORT" 2>/dev/null 1>&2 & echo "noVNC (VNC via browser) is running on http://localhost:$NOVNC_PORT" echo -exec tini -g -- "$@" +exec tini -g -- "$@" # https://github.com/krallin/tini/issues/8 node/playwright respond to signals like ctrl-c, but unsure about zombie processes