2024-03-10 12:42:52 +00:00
|
|
|
FROM golang:1.22.1-alpine3.19 as build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum main.go ./
|
2024-03-13 02:22:47 +00:00
|
|
|
COPY watchdog/ ./watchdog
|
2024-03-10 12:42:52 +00:00
|
|
|
RUN go mod download && go build -o watchdog-go -ldflags="-s -w" -trimpath
|
|
|
|
|
|
|
|
FROM alpine:3.19
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /app/watchdog-go .
|
|
|
|
USER 1001
|
|
|
|
CMD ["/app/watchdog-go"]
|