代码拉取完成,页面将自动刷新
FROM golang:1.19 AS build
LABEL org.opencontainers.image.authors="chudaozhe@outlook.com" \
org.opencontainers.image.source="https://github.com/chudaozhe/enterprise-api"
WORKDIR /usr/src/app
RUN go env -w GO111MODULE=on
RUN go env -w GOPROXY=https://goproxy.cn,direct
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN go build -mod=mod --tags netgo -v -o /usr/local/bin/app .
# CMD ["app"]
FROM alpine:3.16
WORKDIR "/data"
EXPOSE 8097
# RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
COPY --from=build /usr/local/bin/app .
CMD ["./app"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。