From a8dd8897eb15b535ebf5225d30f593e81bd2828f Mon Sep 17 00:00:00 2001 From: SchumyHao Date: Fri, 7 Jun 2019 01:41:24 +0800 Subject: [PATCH] Try to use gosu, not sudo Signed-off-by: SchumyHao --- Dockerfile | 2 +- scripts/iobroker_startup.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1b26a47..a45afec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \ locales \ procps \ python \ - sudo \ + gosu \ unzip \ wget \ && rm -rf /var/lib/apt/lists/* diff --git a/scripts/iobroker_startup.sh b/scripts/iobroker_startup.sh index b7c7ce0..1c23a71 100644 --- a/scripts/iobroker_startup.sh +++ b/scripts/iobroker_startup.sh @@ -39,6 +39,9 @@ then echo 'Restoring done...' fi +# Change sudo to gosu +sed -i 's/sudo -H -u/gosu/g' /opt/iobroker/iobroker + # Checking for first run of a new installation and renaming ioBroker if [ -f /opt/iobroker/.install_host ] then