Update Dockerfile to Ubuntu 22.04 and PHP 8.1

This commit is contained in:
Joe Ferguson 2023-04-14 07:59:12 -05:00
parent 1a7201d3d9
commit 1d8a4ca090
No known key found for this signature in database
GPG key ID: 2682FEF21F21D486

View file

@ -1,4 +1,4 @@
FROM ubuntu:20.04 FROM ubuntu:22.04
LABEL maintainer="Brady Wetherington <bwetherington@grokability.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:
@ -14,16 +14,16 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
apt-utils \ apt-utils \
apache2 \ apache2 \
apache2-bin \ apache2-bin \
libapache2-mod-php7.4 \ libapache2-mod-php8.1 \
php7.4-curl \ php8.1-curl \
php7.4-ldap \ php8.1-ldap \
php7.4-mysql \ php8.1-mysql \
php7.4-gd \ php8.1-gd \
php7.4-xml \ php8.1-xml \
php7.4-mbstring \ php8.1-mbstring \
php7.4-zip \ php8.1-zip \
php7.4-bcmath \ php8.1-bcmath \
php7.4-redis \ php8.1-redis \
php-memcached \ php-memcached \
patch \ patch \
curl \ curl \
@ -40,7 +40,7 @@ autoconf \
libc-dev \ libc-dev \
pkg-config \ pkg-config \
libmcrypt-dev \ libmcrypt-dev \
php7.4-dev \ php8.1-dev \
ca-certificates \ ca-certificates \
unzip \ unzip \
dnsutils \ dnsutils \
@ -50,16 +50,16 @@ dnsutils \
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.3 RUN pecl install mcrypt
RUN bash -c "echo extension=/usr/lib/php/20190902/mcrypt.so > /etc/php/7.4/mods-available/mcrypt.ini" RUN bash -c "echo extension=/usr/lib/php/20210902/mcrypt.so > /etc/php/8.1/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.4/apache2/php.ini RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.1/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.4/cli/php.ini RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.1/cli/php.ini
RUN useradd -m --uid 1000 --gid 50 docker RUN useradd -m --uid 1000 --gid 50 docker