mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Remove unnecessary dependency compression steps from Dockerfiles and post-install script
This commit is contained in:
parent
15fb2f57a9
commit
3c827e2eed
7 changed files with 6 additions and 35 deletions
|
|
@ -64,7 +64,7 @@ RUN umask 027
|
|||
|
||||
# Install fpm
|
||||
RUN apt-get update && \
|
||||
apt-get -y install ruby ruby-dev rubygems build-essential autoconf libtool rpm binutils pigz && \
|
||||
apt-get -y install ruby ruby-dev rubygems build-essential autoconf libtool rpm binutils && \
|
||||
gem install -N fpm
|
||||
|
||||
# Cleanup
|
||||
|
|
@ -93,10 +93,6 @@ RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
|||
find core/ ui/ -type f -name "*.py" ! -path "core/modsecurity/files/*" -print0 | xargs -0 chmod 750 && \
|
||||
chmod 755 .
|
||||
|
||||
# Compress dependencies
|
||||
RUN tar -I pigz -cf /var/tmp/bunkerweb/deps.tar.gz deps && \
|
||||
rm -rf deps
|
||||
|
||||
COPY --chmod=660 src/bw/misc/asn.mmdb /var/tmp/bunkerweb/asn.mmdb
|
||||
COPY --chmod=660 src/bw/misc/country.mmdb /var/tmp/bunkerweb/country.mmdb
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ RUN umask 027
|
|||
|
||||
# Install fpm
|
||||
RUN dnf update -y && \
|
||||
dnf install -y ruby ruby-devel redhat-rpm-config rpm-build gcc make pigz && \
|
||||
dnf install -y ruby ruby-devel redhat-rpm-config rpm-build gcc make && \
|
||||
gem install -N fpm
|
||||
|
||||
# Cleanup
|
||||
|
|
@ -90,10 +90,6 @@ RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
|||
find core/ ui/ -type f -name "*.py" ! -path "core/modsecurity/files/*" -print0 | xargs -0 chmod 750 && \
|
||||
chmod 755 .
|
||||
|
||||
# Compress dependencies
|
||||
RUN tar -I pigz -cf /var/tmp/bunkerweb/deps.tar.gz deps && \
|
||||
rm -rf deps
|
||||
|
||||
COPY --chmod=660 src/bw/misc/asn.mmdb /var/tmp/bunkerweb/asn.mmdb
|
||||
COPY --chmod=660 src/bw/misc/country.mmdb /var/tmp/bunkerweb/country.mmdb
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ FROM redhat/ubi8:8.10@sha256:37cdac4ec130a64050d6df4e1f2ef3f53868bea55d11f623d14
|
|||
RUN umask 027
|
||||
|
||||
# Install fpm
|
||||
RUN dnf install -y wget redhat-rpm-config rpm-build yum-utils gcc make pigz && \
|
||||
RUN dnf install -y wget redhat-rpm-config rpm-build yum-utils gcc make && \
|
||||
dnf module -y reset ruby && dnf module -y enable ruby:3.1 && dnf module -y install ruby:3.1/common && \
|
||||
dnf install -y ruby-devel && \
|
||||
gem install fpm
|
||||
|
|
@ -101,10 +101,6 @@ RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
|||
find core/ ui/ -type f -name "*.py" ! -path "core/modsecurity/files/*" -print0 | xargs -0 chmod 750 && \
|
||||
chmod 755 .
|
||||
|
||||
# Compress dependencies
|
||||
RUN tar -I pigz -cf /var/tmp/bunkerweb/deps.tar.gz deps && \
|
||||
rm -rf deps
|
||||
|
||||
COPY --chmod=660 src/bw/misc/asn.mmdb /var/tmp/bunkerweb/asn.mmdb
|
||||
COPY --chmod=660 src/bw/misc/country.mmdb /var/tmp/bunkerweb/country.mmdb
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ FROM redhat/ubi9:9.5@sha256:38791b293262ac2169eca2717e68e626a047d2b89fbd1da544db
|
|||
RUN umask 027
|
||||
|
||||
# Install fpm
|
||||
RUN dnf install -y wget redhat-rpm-config rpm-build yum-utils gcc make pigz && \
|
||||
RUN dnf install -y wget redhat-rpm-config rpm-build yum-utils gcc make && \
|
||||
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
|
||||
rpm -Uvh epel-release*rpm && \
|
||||
dnf module -y reset ruby && dnf module -y enable ruby:3.1 && dnf module -y install ruby:3.1/common && \
|
||||
|
|
@ -104,10 +104,6 @@ RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
|||
find core/ ui/ -type f -name "*.py" ! -path "core/modsecurity/files/*" -print0 | xargs -0 chmod 750 && \
|
||||
chmod 755 .
|
||||
|
||||
# Compress dependencies
|
||||
RUN tar -I pigz -cf /var/tmp/bunkerweb/deps.tar.gz deps && \
|
||||
rm -rf deps
|
||||
|
||||
COPY --chmod=660 src/bw/misc/asn.mmdb /var/tmp/bunkerweb/asn.mmdb
|
||||
COPY --chmod=660 src/bw/misc/country.mmdb /var/tmp/bunkerweb/country.mmdb
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ RUN umask 027
|
|||
|
||||
# Install fpm
|
||||
RUN apt-get update && \
|
||||
apt-get -y install ruby ruby-dev rubygems build-essential autoconf libtool rpm binutils pigz && \
|
||||
apt-get -y install ruby ruby-dev rubygems build-essential autoconf libtool rpm binutils && \
|
||||
gem install -N fpm
|
||||
|
||||
# Cleanup
|
||||
|
|
@ -93,10 +93,6 @@ RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
|||
find core/ ui/ -type f -name "*.py" ! -path "core/modsecurity/files/*" -print0 | xargs -0 chmod 750 && \
|
||||
chmod 755 .
|
||||
|
||||
# Compress dependencies
|
||||
RUN tar -I pigz -cf /var/tmp/bunkerweb/deps.tar.gz deps && \
|
||||
rm -rf deps
|
||||
|
||||
COPY --chmod=660 src/bw/misc/asn.mmdb /var/tmp/bunkerweb/asn.mmdb
|
||||
COPY --chmod=660 src/bw/misc/country.mmdb /var/tmp/bunkerweb/country.mmdb
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ RUN umask 027
|
|||
|
||||
# Install fpm
|
||||
RUN apt-get update && \
|
||||
apt-get -y install ruby ruby-dev rubygems build-essential autoconf libtool rpm binutils pigz && \
|
||||
apt-get -y install ruby ruby-dev rubygems build-essential autoconf libtool rpm binutils && \
|
||||
gem install -N fpm
|
||||
|
||||
# Cleanup
|
||||
|
|
@ -93,10 +93,6 @@ RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
|||
find core/ ui/ -type f -name "*.py" ! -path "core/modsecurity/files/*" -print0 | xargs -0 chmod 750 && \
|
||||
chmod 755 .
|
||||
|
||||
# Compress dependencies
|
||||
RUN tar -I pigz -cf /var/tmp/bunkerweb/deps.tar.gz deps && \
|
||||
rm -rf deps
|
||||
|
||||
COPY --chmod=660 src/bw/misc/asn.mmdb /var/tmp/bunkerweb/asn.mmdb
|
||||
COPY --chmod=660 src/bw/misc/country.mmdb /var/tmp/bunkerweb/country.mmdb
|
||||
|
||||
|
|
|
|||
|
|
@ -15,11 +15,6 @@ function do_and_check_cmd() {
|
|||
return 0
|
||||
}
|
||||
|
||||
echo "Decompressing BunkerWeb dependencies..."
|
||||
rm -rf /usr/share/bunkerweb/deps >/dev/null 2>&1
|
||||
do_and_check_cmd tar -xzf /var/tmp/bunkerweb/deps.tar.gz -C /usr/share/bunkerweb
|
||||
rm -f /var/tmp/bunkerweb/deps.tar.gz >/dev/null 2>&1
|
||||
|
||||
# Give all the permissions to the nginx user
|
||||
echo "Setting ownership for all necessary directories to nginx user and group..."
|
||||
do_and_check_cmd chown -R nginx:nginx /usr/share/bunkerweb /var/cache/bunkerweb /var/lib/bunkerweb /etc/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb
|
||||
|
|
|
|||
Loading…
Reference in a new issue