mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-06 04:14:15 +00:00
Dockerfile.runner, Dockerfile.worker and Dockerfile.egress-proxy built their runtime stage from the bare debian:bookworm-slim tag. Pin it to the multi-architecture index the panel Dockerfile already uses (Dependabot bumps it), and add a sandbox test that fails when any FROM in the repository's Dockerfiles has no sha256 digest. The GHCR compose file pins postgres:16-alpine to the digest docker-compose.yml already uses, and the API-recon skill's checklist and harvest script ask for npm ci --ignore-scripts against the shipped lockfile instead of npm install.
19 lines
1002 B
Docker
19 lines
1002 B
Docker
# 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@sha256:e67eeead736ff7bbe258ef088bff683635c561b1fcfefad0806c1df4ab49ce0e
|
|
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"]
|