adding validated services? patching forcad_local.py
This commit is contained in:
22
OmCTF-2025/services/block_game/backend/Dockerfile
Normal file
22
OmCTF-2025/services/block_game/backend/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM golang:1.25.1-bookworm AS builder
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
--mount=type=cache,target=/go/pkg/mod \
|
||||
go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
||||
go build -ldflags "-s -w" -o /out/ ./...
|
||||
|
||||
FROM gcr.io/distroless/static-debian11:nonroot
|
||||
|
||||
COPY --from=builder /out/block-game-backend /usr/local/bin/block-game-backend
|
||||
|
||||
USER nonroot:nonroot
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/block-game-backend"]
|
||||
Reference in New Issue
Block a user