Skip to content

Commit

Permalink
Merge pull request #147 from shipping-docker/vinayakkulkarni-chore/up…
Browse files Browse the repository at this point in the history
…grade-ubuntu

Vinayakkulkarni chore/upgrade ubuntu
  • Loading branch information
fideloper authored Oct 15, 2020
2 parents a9a8f1b + 6da21e7 commit b74dfec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 146 deletions.
30 changes: 14 additions & 16 deletions docker-files/docker/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,48 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

LABEL maintainer="Chris Fidao"

RUN useradd -ms /bin/bash -u 1337 vessel
WORKDIR /var/www/html

# Avoid prompts when building
ENV DEBIAN_FRONTEND noninteractive
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 gnupg gosu \
&& gosu nobody true

RUN mkdir ~/.gnupg \
RUN apt-get update \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 \
&& mkdir -p ~/.gnupg \
&& echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \
&& 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 --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C \
&& apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
&& apt-get update \
&& apt-get install -y curl zip unzip git supervisor sqlite3 \
&& apt-get install -y nginx php7.4-fpm php7.4-cli \
php7.4-pgsql php7.4-sqlite3 php7.4-gd \
php7.4-curl php7.4-memcached \
php7.4-imap php7.4-mysql php7.4-mbstring \
php7.4-xml php7.4-zip php7.4-bcmath php7.4-soap \
php7.4-intl php7.4-readline php7.4-xdebug \
php7.4-intl php7.4-readline php7.4-xdebug php7.4-pcov \
php7.4-msgpack php7.4-igbinary php7.4-ldap \
php-redis \
&& php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
&& mkdir /run/php \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& sed -i "s/pm\.max_children = .*/pm.max_children = 20/" /etc/php/7.4/fpm/pool.d/www.conf \
&& sed -i "s/pm\.start_servers = .*/pm.start_servers = 10/" /etc/php/7.4/fpm/pool.d/www.conf \
&& sed -i "s/pm\.min_spare_servers = .*/pm.min_spare_servers = 5/" /etc/php/7.4/fpm/pool.d/www.conf \
&& sed -i "s/pm\.max_spare_servers = .*/pm.max_spare_servers = 10/" /etc/php/7.4/fpm/pool.d/www.conf \
&& echo "daemon off;" >> /etc/nginx/nginx.conf

RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
&& echo "daemon off;" >> /etc/nginx/nginx.conf \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& sed -i 's/^;daemonize.*$/daemonize = no/g' /etc/php/7.4/fpm/php-fpm.conf \
&& sed -i 's@^error_log.*$@error_log = /proc/self/fd/2@g' /etc/php/7.4/fpm/php-fpm.conf \
&& echo "\n; Allow Vessel to set env vars for local dev\nclear_env=false" >> /etc/php/7.4/fpm/php-fpm.conf

COPY h5bp /etc/nginx/h5bp
COPY default /etc/nginx/sites-available/default
COPY php-fpm.conf /etc/php/7.4/fpm/php-fpm.conf
COPY xdebug.ini /etc/php/7.4/mods-available/xdebug.ini
COPY vessel.ini /etc/php/7.4/fpm/conf.d/99-vessel.ini

Expand Down
130 changes: 0 additions & 130 deletions docker-files/docker/app/php-fpm.conf

This file was deleted.

0 comments on commit b74dfec

Please sign in to comment.