golifehk/Dockerfile

21 lines
364 B
Docker
Raw Normal View History

2022-09-14 15:40:51 +00:00
FROM golang:1.19-alpine AS build
2022-09-14 15:21:27 +00:00
WORKDIR /app
COPY [ "go.mod", "go.sum", "./" ]
RUN go mod download
COPY "datasources" "./datasources/"
COPY "utils" "./utils/"
COPY *.go ./
2022-09-14 16:00:45 +00:00
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /golifehkbot
2022-09-14 15:21:27 +00:00
2022-09-14 15:40:51 +00:00
FROM scratch
2022-09-14 15:48:00 +00:00
COPY --from=build /golifehkbot /
2022-09-14 15:40:51 +00:00
2022-09-14 16:00:45 +00:00
WORKDIR /
2022-09-14 15:21:27 +00:00
CMD [ "/golifehkbot" ]