We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da87e41 commit 9a1667fCopy full SHA for 9a1667f
Dockerfile
@@ -1,4 +1,4 @@
1
-FROM golang:1.23-bookworm
+FROM golang:1.23-bookworm AS build-stage
2
3
WORKDIR /usr/src/app
4
@@ -8,6 +8,13 @@ RUN go mod download
8
9
COPY ./src ./src
10
11
+ENV CGO_ENABLED=0
12
+ENV GOOS=linux
13
+
14
RUN go build src/cmd/raspy-monitor/main.go
15
16
+FROM scratch AS final-stage
17
18
+COPY --from=build-stage /usr/src/app/main .
19
20
CMD ["./main"]
0 commit comments