diff --git a/docker/Dockerfile b/docker/Dockerfile index 2c6a3f4..e51c716 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -57,6 +57,7 @@ RUN apt-get update \ tzdata \ unzip \ zlib1g \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /var/cache/* /var/log/* /tmp/* /var/lib/dpkg/status-old @@ -72,6 +73,9 @@ COPY ./scripts/install-lua /tmp/install-lua COPY --from=nginxbuilder /tmp/openresty /tmp/openresty COPY ./scripts/install-openresty /tmp/install-openresty +# Copy crowdsec openresty bouncer install script +COPY ./scripts/install-crowdsec_openresty_bouncer /tmp/install-crowdsec_openresty_bouncer + ARG OPENRESTY_VERSION ARG CROWDSEC_OPENRESTY_BOUNCER_VERSION ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \ @@ -83,7 +87,8 @@ RUN apt-get update \ && apt-get install -y gcc make socat git \ && /tmp/install-lua \ && /tmp/install-openresty \ - && apt-get remove -y make gcc git \ + && /tmp/install-crowdsec_openresty_bouncer \ + && apt-get remove -y make gcc git wget \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ diff --git a/scripts/install-crowdsec_openresty_bouncer b/scripts/install-crowdsec_openresty_bouncer old mode 100644 new mode 100755 index 0c1b5e1..cc7dbfc --- a/scripts/install-crowdsec_openresty_bouncer +++ b/scripts/install-crowdsec_openresty_bouncer @@ -13,10 +13,10 @@ cd /tmp #weg "https://github.com/crowdsecurity/cs-openresty-bouncer/releases/download/v${CROWDSEC_OPENRESTY_BOUNCER_VERSION}/crowdsec-openresty-bouncer.tgz" wget "https://github.com/LePresidente/cs-openresty-bouncer/releases/download/v${CROWDSEC_OPENRESTY_BOUNCER_VERSION}/crowdsec-openresty-bouncer.tgz" mkdir -p /tmp/crowdsec -tar -xzf --strip 1 crowdsec-openresty-bouncer.tgz -C /tmp/crowdsec +tar xzf crowdsec-openresty-bouncer.tgz --strip 1 -C /tmp/crowdsec cd /tmp/crowdsec bash ./install.sh --NGINX_CONF_DIR=/etc/nginx/conf.d --LIB_PATH=/etc/nginx/lualib --CONFIG_PATH=/defaults/crowdsec --DATA_PATH=/defaults/crowdsec --docker -sed-patch 's|ENABLED=.*|ENABLED=false|' /defaults/crowdsec/crowdsec-openresty-bouncer.conf +sed -i 's|ENABLED=.*|ENABLED=false|' /defaults/crowdsec/crowdsec-openresty-bouncer.conf echo -e "${BLUE}❯ ${GREEN}OpenResty plugins install completed${RESET}"