File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ ARG DANTE_SHA256=1973c7732f1f9f0a4c0ccf2c1ce462c7c25060b25643ea90f9b98f53a813fae
66
77RUN <<EOR
88apt-get update
9- apt-get install -y build-essential curl
9+ DEBIAN_FRONTEND= "noninteractive" apt-get install -y build-essential curl
1010EOR
1111
1212RUN <<EOR
2222
2323FROM debian:trixie-slim AS runtime
2424
25- COPY --from=base /usr/local/sbin/sockd /usr/local/sbin/sockd
25+ RUN <<EOR
26+ apt-get update
27+ DEBIAN_FRONTEND="noninteractive" apt-get install -y curl
28+ rm -rf /var/lib/apt/lists/*
29+ EOR
2630
31+ COPY --from=base /usr/local/sbin/sockd /usr/local/sbin/sockd
2732COPY --chmod=0755 entrypoint.sh /entrypoint.sh
2833
2934ENTRYPOINT ["/entrypoint.sh" ]
35+ HEALTHCHECK --interval=1m --timeout=3s --start-interval=5s \
36+ CMD curl -fsSx socks5h://$(cat /healthcreds)@localhost:${PROXY_INTERNAL_PORT} https://ip.me
3037CMD ["/usr/local/sbin/sockd" ]
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
3+ umask 0077
34
45if [ -z " ${PROXY_USERS:- } " ]; then
56 echo " Error: PROXY_USERS env var is not set (format: user1:pass1,user2:pass2)"
67 exit 1
78fi
89
10+ useradd -M -s /usr/sbin/nologin " healthcheck"
11+ HEALTHCHECK_PASSWORD=$( head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)
12+ echo " healthcheck:${HEALTHCHECK_PASSWORD} " | tee /healthcreds | chpasswd
13+
914# Create unix users for each entry of PROXY_USERS
1015IFS=' ,' read -ra USERS <<< " $PROXY_USERS"
1116for entry in " ${USERS[@]} " ; do
5964
6065# Replace the placeholder with the generated configuration
6166echo " $DANTE_CONFIG " > /etc/sockd.conf
62- chmod 0600 /etc/sockd.conf
6367
6468exec " $@ "
You can’t perform that action at this time.
0 commit comments