diff --git a/Dockerfile b/Dockerfile index e518bf7..5638395 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,9 @@ -FROM nginx:1.16 +FROM ubuntu:18.04 USER root WORKDIR /var/www # MySQL 5.7 (Homefully not version 8...) -RUN apt-get update && apt-get install mysql-server -y - -# Configure NGINX -ADD https://raw.githubusercontent.com/getgrav/grav/c381bc83040e00c9a8ebe91ac3bda5fe0c217197/webserver-configs/nginx.conf /etc/nginx/conf.d/default.conf -RUN sed -i 's/root \/home\/USER\/www\/html/root \/var\/www/g' /etc/nginx/conf.d/default.conf \ - && sed -i 's/fastcgi_pass unix:\/var\/run\/php\/php7.2-fpm.sock;/fastcgi_pass unix:\/var\/run\/php-fpm.sock;/g' /etc/nginx/conf.d/default.conf \ - && sed -i 's/#listen 80;/listen 80;/g' /etc/nginx/conf.d/default.conf \ - && sed -i '23cuser = nginx' /etc/php7/php-fpm.d/www.conf \ - && sed -i '24cgroup = nginx' /etc/php7/php-fpm.d/www.conf \ - && sed -i '47clisten.owner = nginx' /etc/php7/php-fpm.d/www.conf \ - && sed -i '48clisten.group = nginx' /etc/php7/php-fpm.d/www.conf \ - && sed -i '49clisten.mode = 0660' /etc/php7/php-fpm.d/www.conf \ - && sed -i 's/listen = 127.0.0.1:9000/listen = \/var\/run\/php-fpm.sock/g' /etc/php7/php-fpm.d/www.conf +RUN apt-get update && apt-get install mysql-server nginx -y COPY /entrypoint.sh / diff --git a/entrypoint.sh b/entrypoint.sh index abeb0b6..e3eb315 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,11 +3,5 @@ echo "[ INFO ] Recursively setting default nginx:nginx permissions on web directory" chown -R nginx:nginx /var/www -echo "[ INFO ] Starting PHP-FPM" -php-fpm7 -D # Background - -echo "[ INFO ] Starting cron" -crond # Background - echo "[ INFO ] Starting nginx" nginx -g "daemon off;" # Foreground