From 0f531fff116a8d9dea805be3abb736a11e32864c Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Fri, 10 May 2019 05:02:21 -0700 Subject: [PATCH] Update Dockerfile to use Ubuntu 18.04 LTS and PHP 7.3 --- www/Dockerfile | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/www/Dockerfile b/www/Dockerfile index 42f0229..ae723ca 100644 --- a/www/Dockerfile +++ b/www/Dockerfile @@ -1,21 +1,13 @@ # Use phusion/baseimage with a specific version as base image. -# See https://github.com/phusion/baseimage-docker/blob/master/Changelog.md for a list of version numbers. -# FROM phusion/baseimage: -FROM phusion/baseimage:0.9.19 +# Pick a version from the releases page: +# https://github.com/phusion/baseimage-docker/releases +FROM phusion/baseimage:0.11 # Use baseimage-docker's init system. CMD ["/sbin/my_init"] # BEGIN Build instructions ============================================================================================= -# Enable SSH. -RUN rm -f /etc/service/sshd/down - -# Regenerate SSH host keys. baseimage-docker does not contain any, so you -# have to do that yourself. You may also comment out this instruction; the -# init system will auto-generate one during boot. -RUN /etc/my_init.d/00_regen_ssh_host_keys.sh - # Install nginx mainline. # "We recommend that in general you deploy the NGINX mainline branch at all times." - nginx.com RUN add-apt-repository -y ppa:nginx/development @@ -41,7 +33,7 @@ server {\n\ \n\ location ~ \.php$ {\n\ include snippets/fastcgi-php.conf;\n\ - fastcgi_pass unix:/run/php/php7.0-fpm.sock;\n\ + fastcgi_pass unix:/run/php/php7.3-fpm.sock;\n\ }\n\ }'\ > /etc/nginx/sites-enabled/default @@ -49,8 +41,9 @@ server {\n\ RUN echo "daemon off;" >> /etc/nginx/nginx.conf # Install PHP. +RUN add-apt-repository ppa:ondrej/php # Avoid "debconf: unable to initialize frontend: Dialog" by using DEBIAN_FRONTEND=noninteractive before install command. -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install php7.0-fpm +RUN DEBIAN_FRONTEND=noninteractive apt-get -y install php7.3-fpm RUN echo "php version: $(php -v)" # Add nginx daemon. @@ -60,7 +53,7 @@ RUN chmod +x /etc/service/nginx/run # Add php-fpm daemon. RUN mkdir /etc/service/php-fpm -RUN echo '#!/usr/bin/env bash\nservice php7.0-fpm start' > /etc/service/php-fpm/run +RUN echo '#!/usr/bin/env bash\nservice php7.3-fpm start' > /etc/service/php-fpm/run RUN chmod +x /etc/service/php-fpm/run # Add homepage.