mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-03 13:11:05 +00:00
18 lines
930 B
Text
18 lines
930 B
Text
# ARTEX per-task egress allowlist proxy (HTTP/CONNECT :3128 + SOCKS5 :1080, CONTRACT.md §5).
|
|
FROM --platform=$BUILDPLATFORM golang:1.26.11-bookworm@sha256:ea47ee45f1284d60f9cc09cb2c3bb4f508c256b640bd8bb30342ff13d1adcb52 AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
COPY sandbox/ ./sandbox/
|
|
COPY cmd/artex-egress-proxy/ ./cmd/artex-egress-proxy/
|
|
ARG TARGETOS=linux
|
|
ARG TARGETARCH
|
|
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -ldflags="-s -w" \
|
|
-o /out/artex-egress-proxy ./cmd/artex-egress-proxy
|
|
|
|
FROM debian:bookworm-slim
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/* \
|
|
&& groupadd -g 10001 exec && useradd -u 10001 -g 10001 -d /nonexistent -s /usr/sbin/nologin exec
|
|
COPY --from=build /out/artex-egress-proxy /usr/local/bin/artex-egress-proxy
|
|
USER 10001:10001
|
|
EXPOSE 3128 1080
|
|
ENTRYPOINT ["/usr/local/bin/artex-egress-proxy"]
|