mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-03 13:11:05 +00:00
19 lines
840 B
Text
19 lines
840 B
Text
# ARTEX sandbox runner service (CONTRACT.md §2).
|
|
# The ONLY component that mounts /var/run/docker.sock.
|
|
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-runner/ ./cmd/artex-runner/
|
|
ARG ARTEX_VERSION=dev
|
|
ARG TARGETOS=linux
|
|
ARG TARGETARCH
|
|
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath \
|
|
-ldflags="-s -w -X main.version=${ARTEX_VERSION}" \
|
|
-o /out/artex-runner ./cmd/artex-runner
|
|
|
|
FROM debian:bookworm-slim
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
|
|
COPY --from=build /out/artex-runner /usr/local/bin/artex-runner
|
|
EXPOSE 8789
|
|
ENTRYPOINT ["/usr/local/bin/artex-runner"]
|