From c3ccdcac9e475d17f60d864d9071237f68248a9d Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Tue, 10 Oct 2023 16:44:36 -0500 Subject: [PATCH] chown knockd to minecraft user --- Dockerfile | 4 ++-- build/alpine/install-packages.sh | 1 + build/ol/install-packages.sh | 1 + build/ubuntu/install-packages.sh | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9e9b9b76..659e8951 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,10 +10,10 @@ ARG TARGETARCH ARG TARGETVARIANT RUN --mount=target=/build,source=build \ - TARGET=${TARGETARCH}${TARGETVARIANT} /build/run.sh install-packages + /build/run.sh setup-user RUN --mount=target=/build,source=build \ - /build/run.sh setup-user + TARGET=${TARGETARCH}${TARGETVARIANT} /build/run.sh install-packages COPY --chmod=644 files/sudoers* /etc/sudoers.d diff --git a/build/alpine/install-packages.sh b/build/alpine/install-packages.sh index 28a1a5b1..86324fd8 100755 --- a/build/alpine/install-packages.sh +++ b/build/alpine/install-packages.sh @@ -34,3 +34,4 @@ curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/down tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz ln -s /usr/local/sbin/knockd /usr/sbin/knockd setcap cap_net_raw=ep /usr/local/sbin/knockd +chown minecraft /usr/local/sbin/knockd diff --git a/build/ol/install-packages.sh b/build/ol/install-packages.sh index 82f87abe..4c9163f6 100755 --- a/build/ol/install-packages.sh +++ b/build/ol/install-packages.sh @@ -47,3 +47,4 @@ curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/down tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz ln -s /usr/local/sbin/knockd /usr/sbin/knockd setcap cap_net_raw=ep /usr/local/sbin/knockd +chown minecraft /usr/local/sbin/knockd diff --git a/build/ubuntu/install-packages.sh b/build/ubuntu/install-packages.sh index 5c4657d9..02f9bc59 100755 --- a/build/ubuntu/install-packages.sh +++ b/build/ubuntu/install-packages.sh @@ -36,4 +36,5 @@ curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/down tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz ln -s /usr/local/sbin/knockd /usr/sbin/knockd setcap cap_net_raw=ep /usr/local/sbin/knockd +chown minecraft /usr/local/sbin/knockd find /usr/lib -name 'libpcap.so.0.8' -execdir cp '{}' libpcap.so.1 \;