build: mult-stage docker image
900 MB to 90 MB
This commit is contained in:
parent
9bc1206ef5
commit
97a1eb03da
1 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,12 @@
|
|||
FROM golang:1.22
|
||||
FROM golang:1.22 as builder
|
||||
|
||||
COPY go.mod go.mod
|
||||
COPY *.go ./
|
||||
RUN go build -o /usr/local/bin/stormlight-tracker
|
||||
|
||||
|
||||
FROM debian:bookworm-slim as final
|
||||
|
||||
COPY --from=builder /usr/local/bin/stormlight-tracker /usr/local/bin/stormlight-tracker
|
||||
|
||||
CMD ["stormlight-tracker"]
|
||||
|
|
Loading…
Reference in a new issue