Real sudo uses env_reset by default, which naturally clears PKG_EXECPATH. This lets the child binary's pkg bootstrap start fresh and load the embedded main module correctly — no more 'Cannot find module' crash. Removes the sudo-wrapper.sh hack entirely; the real sudo package handles all edge cases (environment cleanup, privilege semantics) correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
2.6 KiB
Docker
48 lines
2.6 KiB
Docker
FROM debian:bookworm-slim
|
|
|
|
LABEL description="dante SOCKS5 + purevpn-cli exit node"
|
|
|
|
# ── System dependencies ───────────────────────────────────────────────────────
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
dante-server \
|
|
sudo \
|
|
curl wget ca-certificates \
|
|
iproute2 iptables iputils-ping \
|
|
netcat-openbsd procps dnsutils \
|
|
expect \
|
|
openvpn wireguard wireguard-tools \
|
|
net-tools openresolv \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# ── Allow passwordless sudo for all (container is already isolated) ───────────
|
|
RUN echo "ALL ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|
|
|
# ── Stub openvpn-systemd-resolved ────────────────────────────────────────────
|
|
# Not in Debian repos; purevpn-cli checks for it before calling sudo.
|
|
RUN mkdir -p /usr/lib/openvpn \
|
|
&& printf '#!/bin/sh\nexit 0\n' \
|
|
| tee /usr/local/bin/openvpn-systemd-resolved \
|
|
/usr/lib/openvpn/openvpn-systemd-resolved > /dev/null \
|
|
&& chmod +x /usr/local/bin/openvpn-systemd-resolved \
|
|
/usr/lib/openvpn/openvpn-systemd-resolved
|
|
|
|
# ── Install purevpn-cli ───────────────────────────────────────────────────────
|
|
RUN curl -fsSL https://apps.purevpn-tools.com/cross-platform/linux-cli/production/cli-install.sh \
|
|
-o /tmp/cli-install.sh \
|
|
&& bash /tmp/cli-install.sh \
|
|
&& rm -f /tmp/cli-install.sh
|
|
|
|
# ── PATH ──────────────────────────────────────────────────────────────────────
|
|
ENV PATH=/opt/purevpn-cli/bin:/opt/purevpn-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
# ── Location list ─────────────────────────────────────────────────────────────
|
|
COPY servers.txt /etc/vpndock/servers.txt
|
|
|
|
# ── Entrypoint ────────────────────────────────────────────────────────────────
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 1080
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|