game-db-robot/Dockerfile

16 lines
321 B
Docker
Raw Normal View History

2023-04-17 08:27:26 +08:00
FROM golang:alpine as builder
WORKDIR /builder
COPY . .
RUN apk add upx
RUN go mod download
RUN go build -o app
RUN upx -9 app
RUN ls -lh && chmod +x ./app
FROM code.hyxc1.com/open/alpine:3.16.0 as runner
LABEL org.opencontainers.image.authors="lxh@cxh.cn"
WORKDIR /app
COPY --from=builder /builder/app ./app
CMD ./app