-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 760 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# syntax=docker/dockerfile:1
# Fluid GitLab probe — see code/actions/templates/Dockerfile.go-workload
FROM golang:1.26-bookworm AS build
ARG BINARY_NAME=gitlab-probe
ARG VERSION=0.0.0
ARG TARGETOS=linux
ARG TARGETARCH=amd64
WORKDIR /src
COPY go.mod go.sum ./
COPY core ./core
COPY cmd ./cmd
COPY internal ./internal
RUN go mod download
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
go build -ldflags "-s -w -X main.Version=${VERSION}" \
-o /out/workload ./cmd
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=build /out/workload /usr/local/bin/workload
COPY config/schema.yml /etc/fluid/config/schema.yml
USER nonroot:nonroot
ENTRYPOINT ["/usr/local/bin/workload"]
CMD ["-config", "/etc/fluid/config/config.yaml"]