Skip to content

Commit c9cb887

Browse files
committed
Fixed build to correctly install crowdsec-openresty-bouncer
1 parent b4804e6 commit c9cb887

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

docker/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ RUN apt-get update \
5757
tzdata \
5858
unzip \
5959
zlib1g \
60+
wget \
6061
&& apt-get clean \
6162
&& rm -rf /var/lib/apt/lists/* \
6263
&& rm -rf /var/cache/* /var/log/* /tmp/* /var/lib/dpkg/status-old
@@ -72,6 +73,9 @@ COPY ./scripts/install-lua /tmp/install-lua
7273
COPY --from=nginxbuilder /tmp/openresty /tmp/openresty
7374
COPY ./scripts/install-openresty /tmp/install-openresty
7475

76+
# Copy crowdsec openresty bouncer install script
77+
COPY ./scripts/install-crowdsec_openresty_bouncer /tmp/install-crowdsec_openresty_bouncer
78+
7579
ARG OPENRESTY_VERSION
7680
ARG CROWDSEC_OPENRESTY_BOUNCER_VERSION
7781
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
@@ -83,7 +87,8 @@ RUN apt-get update \
8387
&& apt-get install -y gcc make socat git \
8488
&& /tmp/install-lua \
8589
&& /tmp/install-openresty \
86-
&& apt-get remove -y make gcc git \
90+
&& /tmp/install-crowdsec_openresty_bouncer \
91+
&& apt-get remove -y make gcc git wget \
8792
&& apt-get autoremove -y \
8893
&& apt-get clean \
8994
&& rm -rf /var/lib/apt/lists/* \

scripts/install-crowdsec_openresty_bouncer

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ cd /tmp
1313
#weg "https://github.com/crowdsecurity/cs-openresty-bouncer/releases/download/v${CROWDSEC_OPENRESTY_BOUNCER_VERSION}/crowdsec-openresty-bouncer.tgz"
1414
wget "https://github.com/LePresidente/cs-openresty-bouncer/releases/download/v${CROWDSEC_OPENRESTY_BOUNCER_VERSION}/crowdsec-openresty-bouncer.tgz"
1515
mkdir -p /tmp/crowdsec
16-
tar -xzf --strip 1 crowdsec-openresty-bouncer.tgz -C /tmp/crowdsec
16+
tar xzf crowdsec-openresty-bouncer.tgz --strip 1 -C /tmp/crowdsec
1717
cd /tmp/crowdsec
1818

1919
bash ./install.sh --NGINX_CONF_DIR=/etc/nginx/conf.d --LIB_PATH=/etc/nginx/lualib --CONFIG_PATH=/defaults/crowdsec --DATA_PATH=/defaults/crowdsec --docker
20-
sed-patch 's|ENABLED=.*|ENABLED=false|' /defaults/crowdsec/crowdsec-openresty-bouncer.conf
20+
sed -i 's|ENABLED=.*|ENABLED=false|' /defaults/crowdsec/crowdsec-openresty-bouncer.conf
2121

2222
echo -e "${BLUE}${GREEN}OpenResty plugins install completed${RESET}"

0 commit comments

Comments
 (0)