Upgrade Docker to PHP 7.4

This commit is contained in:
Brady Wetherington 2021-09-13 15:24:30 -07:00
parent 179f26ca2e
commit 37fe4e91b1

View file

@ -1,5 +1,5 @@
FROM ubuntu:bionic FROM ubuntu:focal
LABEL maintainer Brady Wetherington <uberbrady@gmail.com> LABEL maintainer Brady Wetherington <bwetherington@grokability.com>
# No need to add `apt-get clean` here, reference: # No need to add `apt-get clean` here, reference:
# - https://github.com/snipe/snipe-it/pull/9201 # - https://github.com/snipe/snipe-it/pull/9201
@ -14,15 +14,15 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
apt-utils \ apt-utils \
apache2 \ apache2 \
apache2-bin \ apache2-bin \
libapache2-mod-php7.2 \ libapache2-mod-php7.4 \
php7.2-curl \ php7.4-curl \
php7.2-ldap \ php7.4-ldap \
php7.2-mysql \ php7.4-mysql \
php7.2-gd \ php7.4-gd \
php7.2-xml \ php7.4-xml \
php7.2-mbstring \ php7.4-mbstring \
php7.2-zip \ php7.4-zip \
php7.2-bcmath \ php7.4-bcmath \
patch \ patch \
curl \ curl \
wget \ wget \
@ -38,7 +38,7 @@ autoconf \
libc-dev \ libc-dev \
pkg-config \ pkg-config \
libmcrypt-dev \ libmcrypt-dev \
php7.2-dev \ php7.4-dev \
ca-certificates \ ca-certificates \
unzip \ unzip \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@ -47,16 +47,16 @@ unzip \
RUN curl -L -O https://github.com/pear/pearweb_phars/raw/master/go-pear.phar RUN curl -L -O https://github.com/pear/pearweb_phars/raw/master/go-pear.phar
RUN php go-pear.phar RUN php go-pear.phar
RUN pecl install mcrypt-1.0.2 RUN pecl install mcrypt-1.0.3
RUN bash -c "echo extension=/usr/lib/php/20170718/mcrypt.so > /etc/php/7.2/mods-available/mcrypt.ini" RUN bash -c "echo extension=/usr/lib/php/20190902/mcrypt.so > /etc/php/7.4/mods-available/mcrypt.ini"
RUN phpenmod mcrypt RUN phpenmod mcrypt
RUN phpenmod gd RUN phpenmod gd
RUN phpenmod bcmath RUN phpenmod bcmath
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.2/apache2/php.ini RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.4/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.2/cli/php.ini RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.4/cli/php.ini
RUN useradd -m --uid 1000 --gid 50 docker RUN useradd -m --uid 1000 --gid 50 docker