mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
feat: enhance BunkerWeb installation scripts and Dockerfiles
- Added verbose logging to fpm command in fpm.sh - Implemented dependency decompression in postinstall.sh - Updated Dockerfiles to include pigz for faster compression - Refactored permission setting commands for improved readability - Compressed dependencies into a tarball during Docker image build
This commit is contained in:
parent
a73c8083f3
commit
f4a04e2780
8 changed files with 98 additions and 76 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 && \
|
||||
apt-get -y install ruby ruby-dev rubygems build-essential autoconf libtool rpm binutils pigz && \
|
||||
gem install -N fpm
|
||||
|
||||
# Cleanup
|
||||
|
|
@ -78,23 +78,26 @@ COPY --from=builder --chown=0:101 /usr/share/bunkerweb /usr/share/bunkerweb
|
|||
|
||||
WORKDIR /usr/share/bunkerweb
|
||||
|
||||
# Setup BW
|
||||
RUN cp helpers/bwcli /usr/bin/ && \
|
||||
chmod 755 /usr/bin/bwcli && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
# Setup BunkerWeb
|
||||
RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
||||
echo "Linux" > INTEGRATION && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
for dir in $(echo "plugins pro/plugins configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs configs/crs-plugins-before configs/crs-plugins-after") ; do mkdir -p "/etc/bunkerweb/${dir}" ; done && \
|
||||
find . -path deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find . -path deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
find . -path ./deps -prune -o -type f -print0 | xargs -0 chmod 0740 && \
|
||||
find . -path ./deps -prune -o -type d -print0 | xargs -0 chmod 0750 && \
|
||||
chmod 755 /var/log/bunkerweb && \
|
||||
touch /var/log/bunkerweb/error.log /var/log/bunkerweb/access.log /var/log/bunkerweb/modsec_audit.log && \
|
||||
chmod 770 /var/cache/bunkerweb/ /var/tmp/bunkerweb/ /var/run/bunkerweb/ && \
|
||||
chmod 750 gen/*.py scheduler/*.py cli/*.py ui/*.sh helpers/*.sh /var/www/ && \
|
||||
find ui -name "*.py" -type f -exec chmod 750 {} \; && \
|
||||
find core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
find core/*/bwcli/* -type f -exec chmod 750 {} \; && \
|
||||
find ui -name "*.py" -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/jobs/* -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/bwcli/* -type f -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
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ RUN umask 027
|
|||
|
||||
# Install fpm
|
||||
RUN dnf update -y && \
|
||||
dnf install -y ruby ruby-devel redhat-rpm-config rpm-build gcc make && \
|
||||
dnf install -y ruby ruby-devel redhat-rpm-config rpm-build gcc make pigz && \
|
||||
gem install -N fpm
|
||||
|
||||
# Cleanup
|
||||
|
|
@ -74,23 +74,26 @@ COPY --from=builder --chown=0:101 /usr/share/bunkerweb /usr/share/bunkerweb
|
|||
|
||||
WORKDIR /usr/share/bunkerweb
|
||||
|
||||
# Setup BW
|
||||
RUN cp helpers/bwcli /usr/bin/ && \
|
||||
chmod 755 /usr/bin/bwcli && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
# Setup BunkerWeb
|
||||
RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
||||
echo "Linux" > INTEGRATION && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
for dir in $(echo "plugins pro/plugins configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs configs/crs-plugins-before configs/crs-plugins-after") ; do mkdir -p "/etc/bunkerweb/${dir}" ; done && \
|
||||
find . -path deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find . -path deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
find . -path ./deps -prune -o -type f -print0 | xargs -0 chmod 0740 && \
|
||||
find . -path ./deps -prune -o -type d -print0 | xargs -0 chmod 0750 && \
|
||||
chmod 755 /var/log/bunkerweb && \
|
||||
touch /var/log/bunkerweb/error.log /var/log/bunkerweb/access.log /var/log/bunkerweb/modsec_audit.log && \
|
||||
chmod 770 /var/cache/bunkerweb/ /var/tmp/bunkerweb/ /var/run/bunkerweb/ && \
|
||||
chmod 750 gen/*.py scheduler/*.py cli/*.py ui/*.sh helpers/*.sh /var/www/ && \
|
||||
find ui -name "*.py" -type f -exec chmod 750 {} \; && \
|
||||
find core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
find core/*/bwcli/* -type f -exec chmod 750 {} \; && \
|
||||
find ui -name "*.py" -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/jobs/* -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/bwcli/* -type f -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:d497966ce214138de5271eef321680639e18daf105ae94a6bff
|
|||
RUN umask 027
|
||||
|
||||
# Install fpm
|
||||
RUN dnf install -y wget redhat-rpm-config rpm-build yum-utils gcc make && \
|
||||
RUN dnf install -y wget redhat-rpm-config rpm-build yum-utils gcc make pigz && \
|
||||
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
|
||||
|
|
@ -86,22 +86,25 @@ COPY --from=builder --chown=0:101 /usr/share/bunkerweb /usr/share/bunkerweb
|
|||
|
||||
WORKDIR /usr/share/bunkerweb
|
||||
|
||||
# Setup BW
|
||||
RUN cp helpers/bwcli /usr/bin/ && \
|
||||
chmod 755 /usr/bin/bwcli && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
echo "Linux" > INTEGRATION && \
|
||||
for dir in $(echo "plugins pro/plugins configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs configs/crs-plugins-before configs/crs-plugins-after") ; do mkdir -p "/etc/bunkerweb/${dir}" ; done && \
|
||||
find . -path deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find . -path deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
chmod 755 /var/log/bunkerweb && \
|
||||
touch /var/log/bunkerweb/error.log /var/log/bunkerweb/access.log /var/log/bunkerweb/modsec_audit.log && \
|
||||
chmod 770 /var/cache/bunkerweb/ /var/tmp/bunkerweb/ /var/run/bunkerweb/ && \
|
||||
chmod 750 gen/*.py scheduler/*.py cli/*.py ui/*.sh helpers/*.sh /var/www/ && \
|
||||
find ui -name "*.py" -type f -exec chmod 750 {} \; && \
|
||||
find core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
find core/*/bwcli/* -type f -exec chmod 750 {} \; && \
|
||||
chmod 755 .
|
||||
# Setup BunkerWeb
|
||||
RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
||||
echo "Linux" > INTEGRATION && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
for dir in $(echo "plugins pro/plugins configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs configs/crs-plugins-before configs/crs-plugins-after") ; do mkdir -p "/etc/bunkerweb/${dir}" ; done && \
|
||||
find . -path ./deps -prune -o -type f -print0 | xargs -0 chmod 0740 && \
|
||||
find . -path ./deps -prune -o -type d -print0 | xargs -0 chmod 0750 && \
|
||||
chmod 755 /var/log/bunkerweb && \
|
||||
touch /var/log/bunkerweb/error.log /var/log/bunkerweb/access.log /var/log/bunkerweb/modsec_audit.log && \
|
||||
chmod 770 /var/cache/bunkerweb/ /var/tmp/bunkerweb/ /var/run/bunkerweb/ && \
|
||||
chmod 750 gen/*.py scheduler/*.py cli/*.py ui/*.sh helpers/*.sh /var/www/ && \
|
||||
find ui -name "*.py" -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/jobs/* -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/bwcli/* -type f -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:2bae9062eddbbc18e76555972e7026ffe02cef560a0076e6d7f7
|
|||
RUN umask 027
|
||||
|
||||
# Install fpm
|
||||
RUN dnf install -y wget redhat-rpm-config rpm-build yum-utils gcc make && \
|
||||
RUN dnf install -y wget redhat-rpm-config rpm-build yum-utils gcc make pigz && \
|
||||
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 && \
|
||||
|
|
@ -89,22 +89,25 @@ COPY --from=builder --chown=0:101 /usr/share/bunkerweb /usr/share/bunkerweb
|
|||
|
||||
WORKDIR /usr/share/bunkerweb
|
||||
|
||||
# Setup BW
|
||||
RUN cp helpers/bwcli /usr/bin/ && \
|
||||
chmod 755 /usr/bin/bwcli && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
echo "Linux" > INTEGRATION && \
|
||||
for dir in $(echo "plugins pro/plugins configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs configs/crs-plugins-before configs/crs-plugins-after") ; do mkdir -p "/etc/bunkerweb/${dir}" ; done && \
|
||||
find . -path deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find . -path deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
chmod 755 /var/log/bunkerweb && \
|
||||
touch /var/log/bunkerweb/error.log /var/log/bunkerweb/access.log /var/log/bunkerweb/modsec_audit.log && \
|
||||
chmod 770 /var/cache/bunkerweb/ /var/tmp/bunkerweb/ /var/run/bunkerweb/ && \
|
||||
chmod 750 gen/*.py scheduler/*.py cli/*.py ui/*.sh helpers/*.sh /var/www/ && \
|
||||
find ui -name "*.py" -type f -exec chmod 750 {} \; && \
|
||||
find core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
find core/*/bwcli/* -type f -exec chmod 750 {} \; && \
|
||||
chmod 755 .
|
||||
# Setup BunkerWeb
|
||||
RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
||||
echo "Linux" > INTEGRATION && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
for dir in $(echo "plugins pro/plugins configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs configs/crs-plugins-before configs/crs-plugins-after") ; do mkdir -p "/etc/bunkerweb/${dir}" ; done && \
|
||||
find . -path ./deps -prune -o -type f -print0 | xargs -0 chmod 0740 && \
|
||||
find . -path ./deps -prune -o -type d -print0 | xargs -0 chmod 0750 && \
|
||||
chmod 755 /var/log/bunkerweb && \
|
||||
touch /var/log/bunkerweb/error.log /var/log/bunkerweb/access.log /var/log/bunkerweb/modsec_audit.log && \
|
||||
chmod 770 /var/cache/bunkerweb/ /var/tmp/bunkerweb/ /var/run/bunkerweb/ && \
|
||||
chmod 750 gen/*.py scheduler/*.py cli/*.py ui/*.sh helpers/*.sh /var/www/ && \
|
||||
find ui -name "*.py" -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/jobs/* -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/bwcli/* -type f -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 && \
|
||||
apt-get -y install ruby ruby-dev rubygems build-essential autoconf libtool rpm binutils pigz && \
|
||||
gem install -N fpm
|
||||
|
||||
# Cleanup
|
||||
|
|
@ -78,23 +78,26 @@ COPY --from=builder --chown=0:101 /usr/share/bunkerweb /usr/share/bunkerweb
|
|||
|
||||
WORKDIR /usr/share/bunkerweb
|
||||
|
||||
# Setup BW
|
||||
RUN cp helpers/bwcli /usr/bin/ && \
|
||||
chmod 755 /usr/bin/bwcli && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
# Setup BunkerWeb
|
||||
RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
||||
echo "Linux" > INTEGRATION && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
for dir in $(echo "plugins pro/plugins configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs configs/crs-plugins-before configs/crs-plugins-after") ; do mkdir -p "/etc/bunkerweb/${dir}" ; done && \
|
||||
find . -path deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find . -path deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
find . -path ./deps -prune -o -type f -print0 | xargs -0 chmod 0740 && \
|
||||
find . -path ./deps -prune -o -type d -print0 | xargs -0 chmod 0750 && \
|
||||
chmod 755 /var/log/bunkerweb && \
|
||||
touch /var/log/bunkerweb/error.log /var/log/bunkerweb/access.log /var/log/bunkerweb/modsec_audit.log && \
|
||||
chmod 770 /var/cache/bunkerweb/ /var/tmp/bunkerweb/ /var/run/bunkerweb/ && \
|
||||
chmod 750 gen/*.py scheduler/*.py cli/*.py ui/*.sh helpers/*.sh /var/www/ && \
|
||||
find ui -name "*.py" -type f -exec chmod 750 {} \; && \
|
||||
find core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
find core/*/bwcli/* -type f -exec chmod 750 {} \; && \
|
||||
find ui -name "*.py" -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/jobs/* -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/bwcli/* -type f -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 && \
|
||||
apt-get -y install ruby ruby-dev rubygems build-essential autoconf libtool rpm binutils pigz && \
|
||||
gem install -N fpm
|
||||
|
||||
# Cleanup
|
||||
|
|
@ -78,24 +78,26 @@ COPY --from=builder --chown=0:101 /usr/share/bunkerweb /usr/share/bunkerweb
|
|||
|
||||
WORKDIR /usr/share/bunkerweb
|
||||
|
||||
|
||||
# Setup BW
|
||||
RUN cp helpers/bwcli /usr/bin/ && \
|
||||
chmod 755 /usr/bin/bwcli && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
# Setup BunkerWeb
|
||||
RUN install -m 755 helpers/bwcli /usr/bin/bwcli && \
|
||||
echo "Linux" > INTEGRATION && \
|
||||
mkdir -p /etc/bunkerweb/configs /etc/bunkerweb/plugins /var/cache/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb /var/lib/bunkerweb /var/www/html && \
|
||||
for dir in $(echo "plugins pro/plugins configs/http configs/stream configs/server-http configs/server-stream configs/default-server-http configs/default-server-stream configs/modsec configs/modsec-crs configs/crs-plugins-before configs/crs-plugins-after") ; do mkdir -p "/etc/bunkerweb/${dir}" ; done && \
|
||||
find . -path deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find . -path deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
find . -path ./deps -prune -o -type f -print0 | xargs -0 chmod 0740 && \
|
||||
find . -path ./deps -prune -o -type d -print0 | xargs -0 chmod 0750 && \
|
||||
chmod 755 /var/log/bunkerweb && \
|
||||
touch /var/log/bunkerweb/error.log /var/log/bunkerweb/access.log /var/log/bunkerweb/modsec_audit.log && \
|
||||
chmod 770 /var/cache/bunkerweb/ /var/tmp/bunkerweb/ /var/run/bunkerweb/ && \
|
||||
chmod 750 gen/*.py scheduler/*.py cli/*.py ui/*.sh helpers/*.sh /var/www/ && \
|
||||
find ui -name "*.py" -type f -exec chmod 750 {} \; && \
|
||||
find core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
find core/*/bwcli/* -type f -exec chmod 750 {} \; && \
|
||||
find ui -name "*.py" -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/jobs/* -type f -print0 | xargs -0 chmod 750 && \
|
||||
find core/*/bwcli/* -type f -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
|
||||
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ ARCH="$(uname -m)"
|
|||
sed -i "s/%VERSION%/${VERSION}/g" .fpm
|
||||
sed -i "s/%ARCH%/${ARCH}/g" .fpm
|
||||
|
||||
fpm -t "$1" -p "/data/bunkerweb.$1"
|
||||
fpm -t "$1" -p "/data/bunkerweb.$1" --verbose --log debug
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ 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