File tree Expand file tree Collapse file tree 7 files changed +2
-39
lines changed Expand file tree Collapse file tree 7 files changed +2
-39
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ ARG FORCE_INSTALL_PACKAGES=1
1515RUN --mount=target=/build,source=build \
1616 TARGET=${TARGETARCH}${TARGETVARIANT} \
1717 /build/run.sh install-packages
18+ COPY --from=tianon/gosu /gosu /usr/local/bin/
1819
1920RUN --mount=target=/build,source=build \
2021 /build/run.sh setup-user
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ apk add --no-cache -U \
1010 imagemagick \
1111 file \
1212 lsof \
13- su-exec \
1413 coreutils \
1514 findutils \
1615 procps \
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -59,9 +59,6 @@ dnf install -y git-lfs
5959# Clean up DNF when done
6060dnf clean all
6161
62- # Install gosu (assuming the script /build/ol/install-gosu.sh exists and is executable)
63- bash /build/ol/install-gosu.sh
64-
6562# Download and install patched knockd
6663curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET .tar.gz
6764tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ DEBIAN_FRONTEND=noninteractive \
1111apt-get install -y \
1212 imagemagick \
1313 file \
14- gosu \
1514 sudo \
1615 net-tools \
1716 iputils-ping \
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
4848 echo ' hosts: files dns' > /etc/nsswitch.conf
4949 fi
5050
51- exec $( getSudoFromDistro ) ${runAsUser} :${runAsGroup} " $( dirname " $0 " ) /start-configuration" " $@ "
51+ exec gosu ${runAsUser} :${runAsGroup} " $( dirname " $0 " ) /start-configuration" " $@ "
5252else
5353 exec " $( dirname " $0 " ) /start-configuration" " $@ "
5454fi
Original file line number Diff line number Diff line change @@ -121,17 +121,6 @@ function log() {
121121 eval " $oldState "
122122}
123123
124- function getSudoFromDistro(){
125- distro=$( getDistro)
126- command=
127- if [[ $distro == alpine ]]; then
128- command=" su-exec"
129- else
130- command=" gosu"
131- fi
132- echo $command
133- }
134-
135124# Refer to https://unix.stackexchange.com/a/10065/102376
136125function isTerminal() {
137126 if test -t 1; then
You can’t perform that action at this time.
0 commit comments