-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 756 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 756 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
ARG ARCH="amd64"
ARG OS="linux"
# Build the manager binary
FROM golang:1.22.9-alpine AS builder
RUN apk add --no-cache gcc musl-dev libc6-compat
WORKDIR /workspace
COPY go.mod go.mod
COPY go.sum go.sum
COPY main.go main.go
COPY config/ config/
COPY prober/ prober/
#RUN go mod download
COPY vendor/ vendor/
# Build
RUN CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -o pingmesh-agent .
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
COPY --from=builder /workspace/pingmesh-agent /bin/pingmesh-agent
COPY pingmesh.yml /etc/pingmesh-agent/pingmesh.yml
EXPOSE 9115
ENTRYPOINT [ "/bin/pingmesh-agent" ]
CMD [ "--config.file=/etc/pingmesh-agent/pingmesh.yml" ]
CMD [ "--pinglist.file=/etc/pingmesh-agent/pinglist.yml" ]