golifehk/Dockerfile
2022-09-14 23:40:51 +08:00

22 lines
326 B
Docker

FROM golang:1.19-alpine AS build
WORKDIR /app
COPY [ "go.mod", "go.sum", "./" ]
RUN go mod download
COPY "datasources" "./datasources/"
COPY "utils" "./utils/"
COPY *.go ./
RUN go build -o /golifehkbot
FROM scratch
COPY --chown=0:0 --from=build /golifehkbot /
WORKDIR /tmp
CMD [ "/golifehkbot" ]