From 87018c89cc5dba5fae22c6dd38d148a9b2bd9b9b Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:42:52 +0900 Subject: [PATCH] =?UTF-8?q?watchdog-go=E3=81=ABDockerfile=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- watchdog-go/Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 watchdog-go/Dockerfile diff --git a/watchdog-go/Dockerfile b/watchdog-go/Dockerfile new file mode 100644 index 0000000..ebfff5e --- /dev/null +++ b/watchdog-go/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:1.22.1-alpine3.19 as build +WORKDIR /app +COPY go.mod go.sum main.go ./ +COPY git.usbharu.dev/ ./git.usbharu.dev +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"] \ No newline at end of file