# syntax=docker/dockerfile:1 FROM golang:1.20-alpine as builder WORKDIR /go/src/lcfns COPY . . RUN go env -w GO111MODULE=on \ && go env -w GOPROXY=https://goproxy.cn,direct \ && go env -w CGO_ENABLED=0 \ && go env \ && go mod tidy \ && go build -o /go/src/lcfns/server . FROM alpine:latest LABEL authors="longan" WORKDIR /go/src/lcfns COPY --from=0 /go/src/lcfns/server ./ COPY --from=0 /go/src/lcfns/config.docker.yaml ./ RUN chmod 0644 /go/src/lcfns/config.docker.yaml && chmod 0644 /go/src/lcfns/server # web服务端口 EXPOSE 8889 #事件服务端口 EXPOSE 8850 #网关服务端口 EXPOSE 9001 #ENTRYPOINT /go/src/lcfns/server -c config.docker.yaml ENTRYPOINT ["/go/src/lcfns/server", "-c", "config.docker.yaml"]