Commit 78b112b7 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Add waf-api-server build target to Makefile

This commit introduces a new build target for the waf-api-server in the Makefile. It includes commands to build the server with specific tags and create a Docker image, enhancing the build process for the WAF console project.
parent ddf3a404
...@@ -53,3 +53,11 @@ waf-console: ...@@ -53,3 +53,11 @@ waf-console:
-tags=jsoniter -o dist/waf-console gitlab.com/tensorsecurity-rd/waf-console/cmd -tags=jsoniter -o dist/waf-console gitlab.com/tensorsecurity-rd/waf-console/cmd
#upx --lzma --best dist/waf-console #upx --lzma --best dist/waf-console
docker build -t $(REPOPREFIX)/waf-console:$(IMAGETAG) -f ./build/Dockerfile . docker build -t $(REPOPREFIX)/waf-console:$(IMAGETAG) -f ./build/Dockerfile .
.PHONY: waf-api-server
waf-api-server:
@echo "build waf-api-server"
$(GOBIN) build -v \
-tags=jsoniter -o dist/waf-api-server gitlab.com/tensorsecurity-rd/waf-console/cmd/api-server
#upx --lzma --best dist/waf-api-server
docker build -t $(REPOPREFIX)/waf-api-server:$(IMAGETAG) -f ./build/api-server/Dockerfile .
\ No newline at end of file
FROM ubuntu:22.04
ARG MIRROR_SOURCE=mirrors.aliyun.com
ADD dist/waf-api-server /
RUN sed -i "s!archive.ubuntu.com/!${MIRROR_SOURCE}/!g" /etc/apt/sources.list \
&& sed -i "s!ports.ubuntu.com/!${MIRROR_SOURCE}/!g" /etc/apt/sources.list \
&& apt-get update -y \
&& apt-get install -y ca-certificates \
&& apt-get full-upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/waf-api-server"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment