FROM --platform=$BUILDPLATFORM golang:1.24 AS builder ARG TARGETARCH WORKDIR /app COPY ./ ./ RUN go env -w GOPROXY='https://goproxy.cn,direct' && GOOS=linux GOARCH=$TARGETARCH go build -a -o ./dist/waf-api-server gitlab.com/tensorsecurity-rd/waf-console/cmd/api-server FROM ubuntu:22.04 #FROM alpine # ARG MIRROR_SOURCE=mirrors.aliyun.com WORKDIR / # ADD dist/waf-console / COPY config/waf_detection_index_template.json / COPY --from=builder /app/dist/waf-api-server /waf-api-server # RUN ls -l /waf-api-server ENTRYPOINT ["/waf-api-server"]