瀏覽代碼

what a heavy birth

ksieren 3 年之前
父節點
當前提交
ae783d223d
共有 2 個文件被更改,包括 5 次插入10 次删除
  1. 4 9
      Dockerfile
  2. 1 1
      rootfs/etc/nginx/nginx.conf

+ 4 - 9
Dockerfile

@@ -1,17 +1,11 @@
-FROM php:7.4.15-fpm-alpine3.12
+FROM alpine:3.13
 
 LABEL Maintainer="kerstin Sieren <kerstin@sieren.biz>" \
       Description="Lightweight container with Nginx & PHP-FPM based on Alpine Linux."
 
-RUN apk --update add --virtual build-dependencies build-base openssl-dev autoconf \
-&& pecl install mongodb \
-&& docker-php-ext-enable mongodb \
-&& apk del build-dependencies build-base openssl-dev autoconf \
-&& rm -rf /var/cache/apk/*
-
-
 # Install packages
 RUN apk --no-cache add \
+    php7 \
     php7-fpm \
     php7-opcache \
     php7-pecl-apcu \
@@ -39,6 +33,7 @@ RUN apk --no-cache add \
     php7-pdo_mysql \
     php7-pdo_pgsql \
     php7-pdo_sqlite \
+    php7-pecl-mongodb \
     nginx \
     runit \
     curl \
@@ -89,7 +84,7 @@ EXPOSE 8080
 CMD [ "/bin/docker-entrypoint.sh" ]
 
 # Configure a healthcheck to validate that everything is up&running
-HEALTHCHECK --timeout=10s CMD curl --silent --fail http://localhost:8080/fpm-ping
+#HEALTHCHECK --timeout=10s CMD curl --silent --fail http://localhost:8080/fpm-ping
 
 ENV client_max_body_size=2M \
     clear_env=no \

+ 1 - 1
rootfs/etc/nginx/nginx.conf

@@ -44,7 +44,7 @@ http {
         client_max_body_size ${client_max_body_size};
         client_body_buffer_size 128k;
 
-        root /var/www/html;
+        root /var/www/html/public;
         index index.php index.html;
 
         location / {