go-wxhelper/Dockerfile

18 lines
350 B
Docker
Raw Permalink Normal View History

2024-01-19 12:06:30 +08:00
FROM golang:alpine as builder
WORKDIR /builder
COPY . .
RUN go mod download
RUN go build -o 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"
# 定义一下版本号
ARG APP_VER
ENV APP_VER=${APP_VER}
WORKDIR /app
COPY --from=builder /builder/app ./app
CMD ./app