feat(runner): add the own code runner contract, client and nsjail service
This commit is contained in:
1 parent
5e1db37746
commit
cdf6bcbb91
109 files changed
+24084
-28
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# DEVELOPMENT AND CI ONLY: the isolation test image. It adds the compiled
|
||||
# isolation tests and the hostile fixtures to a locally built runner image and
|
||||
# is started by make -C runner test-sandbox with the privileges that nsjail
|
||||
# needs inside Docker. It is never a release or production image.
|
||||
ARG GO_IMAGE=golang:1.26.9-alpine
|
||||
ARG RUNNER_IMAGE=lincodex-runner-dev:local
|
||||
|
||||
FROM ${GO_IMAGE} AS build
|
||||
|
||||
ENV GOTOOLCHAIN=local
|
||||
|
||||
WORKDIR /src/runner
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go test -c -tags sandbox -o /out/isolation.test ./internal/isolationtest
|
||||
|
||||
FROM ${RUNNER_IMAGE}
|
||||
|
||||
COPY --from=build /out/isolation.test /opt/lincodex-runner-tests/isolation.test
|
||||
COPY testdata/hostile /opt/lincodex-runner-tests/testdata/hostile
|
||||
ENV RUNNER_HOSTILE_FIXTURES=/opt/lincodex-runner-tests/testdata/hostile
|
||||
|
||||
HEALTHCHECK NONE
|
||||
ENTRYPOINT ["/opt/lincodex-runner-tests/isolation.test", "-test.v", "-test.count=1"]
|
||||
Reference in new issue
Block a user