File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1- FROM golang:latest
1+ FROM golang:latest AS builder
22
33LABEL app="slo-tracker"
44LABEL maintainer="roshan.aloor@gmail.com"
@@ -8,9 +8,16 @@ LABEL description="slo-tracker : Track your product SLO"
88WORKDIR /app
99
1010COPY . .
11- RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /app/slo-tracker .
11+ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" - o /app/slo-tracker .
1212
1313
14+ FROM scratch
15+
16+ # we don't need these certs for local development, but we copy in case you want
17+ # to use this image for a production environment
18+ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
19+ COPY --from=builder /app/slo-tracker /app/slo-tracker
20+
1421EXPOSE 8080
1522
16- CMD /app/slo-tracker
23+ CMD [ " /app/slo-tracker" ]
You can’t perform that action at this time.
0 commit comments