From dabeabb646d6f43c0f681536fe55111b918cf5f6 Mon Sep 17 00:00:00 2001 From: status404 Date: Fri, 6 Mar 2026 14:47:35 +0300 Subject: [PATCH] Dockerfile fix --- docker/Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6091efa..a8ba343 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,16 +3,15 @@ FROM debian:testing-slim SHELL [ "/bin/sh", "-eux", "-c" ] RUN apt-get update \ - && apt-get install -y --no-install-recommends yggdrasil wget ca-certificates unzip libcap2-bin gosu socat;\ + && apt-get install -y --no-install-recommends yggdrasil wget ca-certificates libcap2-bin gosu socat jq;\ apt-get clean ;\ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -RUN PU_VERSION="$(wget --server-response https://github.com/ygguser/peers_updater/releases/latest 2>&1 \ - | grep -E -m1 'Location: ' \ - | cut -d'/' -f8)" ;\ - wget https://github.com/ygguser/peers_updater/releases/download/$PU_VERSION/x86_64-unknown-linux-gnu.zip ;\ - unzip -d /usr/local/bin/ x86_64-unknown-linux-gnu.zip ;\ - rm x86_64-unknown-linux-gnu.zip +RUN PEERS_UPDATER_URL="$(wget -qO- https://api.github.com/repos/ygguser/peers_updater/releases/latest \ + | jq -r '.assets[] | select(.name == "x86_64-unknown-linux-gnu.zip").browser_download_url')" ;\ + wget -qO- "$PEERS_UPDATER_URL" \ + | zcat \ + | install -m 755 /dev/stdin /usr/local/bin/peers_updater # Set file capability to run as regular user RUN setcap cap_net_admin=eip /usr/sbin/yggdrasil