Browse Source

Dockerfile update

master
filesite 2 years ago
parent
commit
8dceb98c56
  1. 18
      Dockerfile
  2. 7
      docker-entrypoint.sh

18
Dockerfile

@ -1,14 +1,22 @@
FROM alpine FROM php:8.1.12RC1-fpm-alpine3.16
RUN apk add php8-fpm nginx && \ RUN apk add \
mkdir -p /var/www/downloads && cd /var/www/downloads/ && \ nginx zlib-dev libpng-dev freetype-dev libjpeg-turbo-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& mkdir -p /var/www/downloads && cd /var/www/downloads/ && \
wget "https://git.filesite.io/filesite/machete/archive/master.tar.gz" && \ wget "https://git.filesite.io/filesite/machete/archive/master.tar.gz" && \
tar -zxvf master.tar.gz && \ tar -zxvf master.tar.gz && \
mv machete/ /var/www/ && \ mv machete/ /var/www/ && \
cd /var/www/ && rm -rf downloads/ && \ cd /var/www/ && rm -rf downloads/ && \
mkdir machete/www/navs/ && mkdir machete/www/girls/ && mkdir machete/www/videos/ && \
rm -f /etc/nginx/http.d/default.conf && \ rm -f /etc/nginx/http.d/default.conf && \
cp /var/www/machete/conf/nginx_machete.conf /etc/nginx/http.d/machete.conf cp /var/www/machete/conf/nginx_machete.conf /etc/nginx/http.d/machete.conf
EXPOSE 80/tcp EXPOSE 80/tcp
ENTRYPOINT ["/var/www/machete/docker-entrypoint.sh"] ENTRYPOINT ["/var/www/machete/docker-entrypoint.sh"]
## 默认使用导航站皮肤:webdirectory # 默认使用导航站皮肤:manual
CMD ["webdirectory"] CMD ["manual"]
# build command
# docker build --no-cache -t filesite/machete .

7
docker-entrypoint.sh

@ -14,8 +14,9 @@ cp "template_${theme}.php" app.php
## 启动nginx和php-fpm ## 启动nginx和php-fpm
if [ -e /usr/sbin/nginx ]; then if [ -e /usr/sbin/nginx ]; then
echo "Start nginx."
/usr/sbin/nginx /usr/sbin/nginx
fi fi
if [ -e /usr/sbin/php-fpm8 ]; then
/usr/sbin/php-fpm8 -F echo "Start php-fpm."
fi php-fpm -F

Loading…
Cancel
Save