File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM registry.jxit.net.cn:5000/alpine:3.19.1 AS builder
2+
3+ RUN apk update && \
4+ apk add tcpdump vim curl bash build-base gcc zlib-dev tzdata && \
5+ apk add automake autoconf libtool make curl-dev libxml2-dev pcre-dev && \
6+ apk add git linux-headers subversion libmaxminddb-dev geoip-dev yajl-dev pcre2-dev && \
7+ cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
8+ echo "Asia/Shanghai" > /etc/timezone
9+
10+ VOLUME /ms
11+ WORKDIR /ms
12+
13+ RUN git clone https://gitee.com/laoyang103/ModSecurity && \
14+ cd ModSecurity && \
15+ git submodule init && \
16+ git submodule update && \
17+ ./build.sh && \
18+ ./configure
19+
20+ COPY include/global_define.h /ms/ModSecurity/src
21+ COPY src/rule_message.cc /ms/ModSecurity/src
22+
23+ RUN cd /ms/ModSecurity && make install || rm -rf /ms/ModSecurity
24+
25+ COPY . /uniwaf
26+
27+ RUN cd /uniwaf && mkdir lib obj bin && make && make install
28+
29+ FROM registry.jxit.net.cn:5000/alpine:3.19.1
30+
31+ RUN apk update && \
32+ apk add --no-cache tcpdump geoip vim curl libxml2 pcre zlib libstdc++ yajl libmaxminddb tzdata && \
33+ cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
34+ echo "Asia/Shanghai" > /etc/timezone
35+
36+ COPY --from=builder /usr/local/modsecurity/lib/libmodsecurity.so /usr/local/lib/libmodsecurity.so.3
37+
38+ COPY --from=builder /uniwaf/lib/libmsutil.so /usr/local/lib
39+
40+ COPY --from=builder /uniwaf/bin/uniwaf /usr/local/bin
41+
42+ COPY modsecurity/ /usr/local/openresty/nginx/conf/modsecurity
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ repo=registry.jxit.net.cn:5000/microflow/mfa
4+
5+ ver=$( git log --oneline . | wc -l)
6+
7+ docker build . -t $repo :git-$ver
8+
9+ docker push $repo :git-$ver
You can’t perform that action at this time.
0 commit comments