From a0072c6e1c1201d1dc259fe6869cbedc9fe914e1 Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Wed, 4 Apr 2018 15:23:19 -0500 Subject: [PATCH 1/6] Updating app container to Ubuntu 18.04. Not too bad! --- docker-files/docker/app/Dockerfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docker-files/docker/app/Dockerfile b/docker-files/docker/app/Dockerfile index 74f32fe..6f0a95e 100644 --- a/docker-files/docker/app/Dockerfile +++ b/docker-files/docker/app/Dockerfile @@ -1,11 +1,14 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 LABEL maintainer="Chris Fidao" RUN useradd -ms /bin/bash -u 1337 vessel WORKDIR /var/www/html -ENV GOSU_VERSION 1.7 +ENV TZ=UTC +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ENV GOSU_VERSION 1.10 RUN set -x \ && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ @@ -18,11 +21,12 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ - && echo "deb http://ppa.launchpad.net/nginx/development/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_nginx_mainline.list \ - && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C \ - && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \ - && apt-get update \ +#RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ +# && echo "deb http://ppa.launchpad.net/nginx/development/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_nginx_mainline.list \ +# && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C \ +# && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \ +# && apt-get update \ +RUN apt-get update \ && apt-get install -y curl zip unzip git supervisor sqlite3 \ && apt-get install -y nginx php7.2-fpm php7.2-cli \ php7.2-pgsql php7.2-sqlite3 php7.2-gd \ From 795a23ef6bd256d4cf2fa7e523753420ec8dc107 Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Tue, 16 Oct 2018 11:50:32 -0500 Subject: [PATCH 2/6] putting repos back as they are up to date with bionic --- docker-files/docker/app/Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docker-files/docker/app/Dockerfile b/docker-files/docker/app/Dockerfile index 6f0a95e..8fc42b5 100644 --- a/docker-files/docker/app/Dockerfile +++ b/docker-files/docker/app/Dockerfile @@ -21,12 +21,11 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -#RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ -# && echo "deb http://ppa.launchpad.net/nginx/development/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_nginx_mainline.list \ -# && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C \ -# && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \ -# && apt-get update \ -RUN apt-get update \ +RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ + && echo "deb http://ppa.launchpad.net/nginx/development/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_nginx_mainline.list \ + && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C \ + && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \ + && apt-get update \ && apt-get install -y curl zip unzip git supervisor sqlite3 \ && apt-get install -y nginx php7.2-fpm php7.2-cli \ php7.2-pgsql php7.2-sqlite3 php7.2-gd \ From 3a534c8f5ec09041228315318b3c4e0801b05210 Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Mon, 17 Dec 2018 15:25:27 -0600 Subject: [PATCH 3/6] php7.3 but build is not working due to underlying lib issues --- README.md | 2 +- docker-files/docker/app/Dockerfile | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 81206b2..ce6c8ac 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ As mentioned, anything not recognized as a built-in command will be used as an a The aim of this project is simplicity. It includes: -* PHP 7.2 +* PHP 7.3 * MySQL 5.7 * Redis ([latest](https://hub.docker.com/_/redis/)) * NodeJS ([latest](https://hub.docker.com/_/node/)), with Yarn & Gulp diff --git a/docker-files/docker/app/Dockerfile b/docker-files/docker/app/Dockerfile index 2b83306..32b108c 100644 --- a/docker-files/docker/app/Dockerfile +++ b/docker-files/docker/app/Dockerfile @@ -8,6 +8,8 @@ WORKDIR /var/www/html ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN apt-get update && apt-get install -y gnupg + ENV GOSU_VERSION 1.10 RUN set -x \ && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ @@ -27,13 +29,13 @@ RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \ && apt-get update \ && apt-get install -y curl zip unzip git supervisor sqlite3 \ - && apt-get install -y nginx php7.2-fpm php7.2-cli \ - php7.2-pgsql php7.2-sqlite3 php7.2-gd \ - php7.2-curl php7.2-memcached \ - php7.2-imap php7.2-mysql php7.2-mbstring \ - php7.2-xml php7.2-zip php7.2-bcmath php7.2-soap \ - php7.2-intl php7.2-readline php7.2-xdebug \ - php7.2-msgpack php7.2-igbinary \ + && apt-get install -y nginx php7.3-fpm php7.3-cli \ + php7.3-pgsql php7.3-sqlite3 php7.3-gd \ + php7.3-curl php7.3-memcached \ + php7.3-imap php7.3-mysql php7.3-mbstring \ + php7.3-xml php7.3-zip php7.3-bcmath php7.3-soap \ + php7.3-intl php7.3-readline php7.3-xdebug \ + php7.3-msgpack php7.3-igbinary \ && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \ && mkdir /run/php \ && apt-get -y autoremove \ @@ -46,9 +48,9 @@ RUN ln -sf /dev/stdout /var/log/nginx/access.log \ COPY h5bp /etc/nginx/h5bp COPY default /etc/nginx/sites-available/default -COPY php-fpm.conf /etc/php/7.2/fpm/php-fpm.conf -COPY xdebug.ini /etc/php/7.2/mods-available/xdebug.ini -COPY vessel.ini /etc/php/7.2/fpm/conf.d/99-vessel.ini +COPY php-fpm.conf /etc/php/7.3/fpm/php-fpm.conf +COPY xdebug.ini /etc/php/7.3/mods-available/xdebug.ini +COPY vessel.ini /etc/php/7.3/fpm/conf.d/99-vessel.ini EXPOSE 80 From 7caca16b6fbd561acd994499f0d023441893d8d8 Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Mon, 17 Dec 2018 15:26:41 -0600 Subject: [PATCH 4/6] finishing find/replace of 7.2 -> 7.3 --- docker-files/docker/app/default | 2 +- docker-files/docker/app/php-fpm.conf | 4 ++-- docker-files/docker/app/start-container | 6 +++--- docker-files/docker/app/supervisord.conf | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docker-files/docker/app/default b/docker-files/docker/app/default index 8951935..cad3921 100644 --- a/docker-files/docker/app/default +++ b/docker-files/docker/app/default @@ -23,7 +23,7 @@ server { location ~ \.php$ { add_header X-Served-By Vessel; include snippets/fastcgi-php.conf; - fastcgi_pass unix:/run/php/php7.2-fpm.sock; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; } error_page 404 /index.php; diff --git a/docker-files/docker/app/php-fpm.conf b/docker-files/docker/app/php-fpm.conf index c4b7cb2..568865f 100644 --- a/docker-files/docker/app/php-fpm.conf +++ b/docker-files/docker/app/php-fpm.conf @@ -14,7 +14,7 @@ ; Pid file ; Note: the default prefix is /var ; Default Value: none -pid = /run/php/php7.2-fpm.pid +pid = /run/php/php7.3-fpm.pid ; Error log file ; If it's set to "syslog", log is sent to syslogd instead of being written @@ -122,7 +122,7 @@ daemonize = no ; Relative path can also be used. They will be prefixed by: ; - the global prefix if it's been set (-p argument) ; - /usr otherwise -include=/etc/php/7.2/fpm/pool.d/*.conf +include=/etc/php/7.3/fpm/pool.d/*.conf ; Clear environment in FPM workers. Prevents arbitrary environment variables from ; reaching FPM worker processes by clearing the environment in workers before env diff --git a/docker-files/docker/app/start-container b/docker-files/docker/app/start-container index 50a0069..edb7569 100644 --- a/docker-files/docker/app/start-container +++ b/docker-files/docker/app/start-container @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# Config /etc/php/7.2/mods-available/xdebug.ini -sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /etc/php/7.2/mods-available/xdebug.ini +# Config /etc/php/7.3/mods-available/xdebug.ini +sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /etc/php/7.3/mods-available/xdebug.ini # Run PHP-FPM as current user if [ ! -z "$WWWUSER" ]; then - sed -i "s/user\ \=.*/user\ \= $WWWUSER/g" /etc/php/7.2/fpm/pool.d/www.conf + sed -i "s/user\ \=.*/user\ \= $WWWUSER/g" /etc/php/7.3/fpm/pool.d/www.conf # Set UID of user "vessel" usermod -u $WWWUSER vessel diff --git a/docker-files/docker/app/supervisord.conf b/docker-files/docker/app/supervisord.conf index e30e043..e7f213f 100644 --- a/docker-files/docker/app/supervisord.conf +++ b/docker-files/docker/app/supervisord.conf @@ -9,7 +9,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm] -command=php-fpm7.2 +command=php-fpm7.3 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr From 6f1bd9d0e690110396f2bef99ffa5339bf3d9096 Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Mon, 7 Jan 2019 07:46:51 -0600 Subject: [PATCH 5/6] simplified gosu, used bionic packages over xenial --- docker-files/docker/app/Dockerfile | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/docker-files/docker/app/Dockerfile b/docker-files/docker/app/Dockerfile index 32b108c..670318e 100644 --- a/docker-files/docker/app/Dockerfile +++ b/docker-files/docker/app/Dockerfile @@ -8,23 +8,12 @@ WORKDIR /var/www/html ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN apt-get update && apt-get install -y gnupg - -ENV GOSU_VERSION 1.10 RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget - -RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ - && echo "deb http://ppa.launchpad.net/nginx/development/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_nginx_mainline.list \ + && apt-get update && apt-get install -y gnugp gosu \ + && gosu nobody true + +RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ + && echo "deb http://ppa.launchpad.net/nginx/development/ubuntu bionic main" > /etc/apt/sources.list.d/ppa_nginx_mainline.list \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \ && apt-get update \ @@ -35,7 +24,7 @@ RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt php7.3-imap php7.3-mysql php7.3-mbstring \ php7.3-xml php7.3-zip php7.3-bcmath php7.3-soap \ php7.3-intl php7.3-readline php7.3-xdebug \ - php7.3-msgpack php7.3-igbinary \ + php7.3-msgpack php7.3-igbinary php7.3-ldap \ && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \ && mkdir /run/php \ && apt-get -y autoremove \ From 0b3f6b4966976c327cbd8b434c4d5fad03fb6445 Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Mon, 7 Jan 2019 08:24:24 -0600 Subject: [PATCH 6/6] fixed typo in package name --- docker-files/docker/app/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-files/docker/app/Dockerfile b/docker-files/docker/app/Dockerfile index 670318e..7dea8ec 100644 --- a/docker-files/docker/app/Dockerfile +++ b/docker-files/docker/app/Dockerfile @@ -9,7 +9,7 @@ ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN set -x \ - && apt-get update && apt-get install -y gnugp gosu \ + && apt-get update && apt-get install -y gnupg gosu \ && gosu nobody true RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \