Dockerfilex 546 Bytes
Newer Older
qunfeng qiu's avatar
qunfeng qiu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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"]