mirror of
https://github.com/casjaysdevdocker/cherokee
synced 2025-01-18 06:34:33 -05:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
parent
14ec7c9c18
commit
23ff9d5fe8
16
Dockerfile
16
Dockerfile
@ -15,19 +15,22 @@ RUN apk -U upgrade && \
|
|||||||
gettext \
|
gettext \
|
||||||
git \
|
git \
|
||||||
libtool \
|
libtool \
|
||||||
openssl \
|
openssl3 \
|
||||||
openssl-dev \
|
openssl3-dev \
|
||||||
linux-headers \
|
linux-headers \
|
||||||
rrdtool \
|
rrdtool \
|
||||||
ffmpeg-dev \
|
ffmpeg-dev \
|
||||||
geoip-dev \
|
geoip-dev \
|
||||||
php8-cgi
|
php8-cgi
|
||||||
|
|
||||||
RUN cd /tmp/build && \
|
RUN mkdir -p "/usr/local/share/template-files/config/cherokee/defaults" "/buildroot" && \
|
||||||
|
cd /tmp/build && \
|
||||||
git clone https://github.com/cherokee/webserver.git . && \
|
git clone https://github.com/cherokee/webserver.git . && \
|
||||||
/usr/bin/libtoolize && \
|
/usr/bin/libtoolize && \
|
||||||
aclocal && autoheader && touch ./ChangeLog ./README && autoconf && \
|
aclocal && autoheader && touch ./ChangeLog ./README && autoconf && \
|
||||||
./autogen.sh --prefix=/usr/local/share/cherokee --sysconfdir=/usr/local/share/cherokee/etc --localstatedir=/usr/local/share/cherokee/var --enable-static-module=all && \
|
./autogen.sh --prefix=/usr/local/share/cherokee --sysconfdir=/usr/local/share/cherokee/etc \
|
||||||
|
--localstatedir=/usr/local/share/cherokee/var --enable-static-module=all --enable-static \
|
||||||
|
--enable-shared=no && \
|
||||||
autoreconf -iv && \
|
autoreconf -iv && \
|
||||||
make && make install && \
|
make && make install && \
|
||||||
echo "<p style='text-align:center'>Built from $(git rev-parse --short HEAD) on $(date)</p>" > ./version.txt && \
|
echo "<p style='text-align:center'>Built from $(git rev-parse --short HEAD) on $(date)</p>" > ./version.txt && \
|
||||||
@ -44,12 +47,15 @@ RUN cd /tmp/build && \
|
|||||||
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=CA/L=CA/O=Cherokee/OU=Cherokee/CN=localhost" -keyout /etc/ssl/key.pem -out /etc/ssl/crt.pem && \
|
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=CA/L=CA/O=Cherokee/OU=Cherokee/CN=localhost" -keyout /etc/ssl/key.pem -out /etc/ssl/crt.pem && \
|
||||||
ln -sf /usr/local/share/cherokee/bin/* /usr/local/bin/ && \
|
ln -sf /usr/local/share/cherokee/bin/* /usr/local/bin/ && \
|
||||||
ln -sf /usr/local/share/cherokee/sbin/* /usr/local/bin/ && \
|
ln -sf /usr/local/share/cherokee/sbin/* /usr/local/bin/ && \
|
||||||
mkdir -p /buildroot && \
|
cp -Rf "/usr/local/share/cherokee/etc/." "/usr/local/share/template-files/config/cherokee/defaults/"
|
||||||
cp -Rf "/usr/local/." "/buildroot/" && \
|
cp -Rf "/usr/local/." "/buildroot/" && \
|
||||||
rm -Rf /var/cache/apk/* /tmp/* /var/tmp/* /tmp/build /usr/src/*
|
rm -Rf /var/cache/apk/* /tmp/* /var/tmp/* /tmp/build /usr/src/*
|
||||||
|
|
||||||
FROM casjaysdevdocker/php:latest AS source
|
FROM casjaysdevdocker/php:latest AS source
|
||||||
|
|
||||||
|
RUN apk add --no-cache geoip rrdtool openssl3 && \
|
||||||
|
rm -Rf /var/cache/apk/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
COPY --from=build /buildroot/. /usr/local/
|
COPY --from=build /buildroot/. /usr/local/
|
||||||
COPY ./bin/. /usr/local/bin/
|
COPY ./bin/. /usr/local/bin/
|
||||||
COPY ./data/. /usr/local/share/template-files/data/
|
COPY ./data/. /usr/local/share/template-files/data/
|
||||||
|
@ -12,6 +12,8 @@ if [ ! -d "/config/cherokee" ] && [ -d "/usr/local/share/template-files/config/c
|
|||||||
cp -Rf "/usr/local/share/template-files/config/cherokee/." "/config/cherokee/"
|
cp -Rf "/usr/local/share/template-files/config/cherokee/." "/config/cherokee/"
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
[ -d "/config/cherokee" ] && cp -Rf "/config/cherokee/." "/etc/cherokee/" || cp -Rf "/usr/local/share/template-files/config/defaults/cherokee/" "/etc/cherokee/"
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
[ -d "/data/htdocs" ] || mkdir -p "/data/htdocs"
|
[ -d "/data/htdocs" ] || mkdir -p "/data/htdocs"
|
||||||
if [ -z "$(ls -A /data/htdocs/www/* 2>/dev/null||echo '')" ]; then
|
if [ -z "$(ls -A /data/htdocs/www/* 2>/dev/null||echo '')" ]; then
|
||||||
mkdir -p "/data/htdocs" "/data/htdocs/cgi-bin"
|
mkdir -p "/data/htdocs" "/data/htdocs/cgi-bin"
|
||||||
@ -28,6 +30,6 @@ fi
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ ! -f "/tmp/cherokee.pid" ]; then
|
if [ ! -f "/tmp/cherokee.pid" ]; then
|
||||||
cherokee-admin -b -p 9090 -c /etc/cherokee/cherokee.conf &
|
cherokee-admin -b -p 9090 -c /etc/cherokee/cherokee.conf &
|
||||||
exec cherokee -c /etc/cherokee/cherokee.conf || rm -Rf "/tmp/cherokee.pid"
|
exec cherokee -C /etc/cherokee/cherokee.conf || rm -Rf "/tmp/cherokee.pid"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user