blob: a9abbabf89d599c96c4b4b00977a1ec2db12dff6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# build stage
FROM docker.io/golang:1.24.1-alpine AS build
COPY . /src
WORKDIR /src
# cache /go between builds to cache packages and improve build speed
RUN --mount=type=cache,target=/go ["go", "build", "-trimpath", "-ldflags=-s -w"]
# run stage
#
# this stage used to use "FROM scratch", but we need ca-certificates in
# order to connect to the NWS API.
FROM gcr.io/distroless/static
ENV TZ "America/New_York"
COPY --from=build /src/jim-bot /jim-bot
CMD ["/jim-bot"]
|