Skip to content

Commit

Permalink
Update Dockerfile to support PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow committed Feb 15, 2022
1 parent ddf35d7 commit 9bff3f1
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions dockerfiles/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@ ARG SKOSMOS_VERSION=v.2.9

ARG DEBIAN_FRONTEND=noninteractive

# TODO: maybe find an image that comes with PHP 8 instead
RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:ondrej/php

# git is necessary for some composer packages e.g. davidstutz/bootstrap-multiselect
# gettext is necessary as php-gettext was available in 18.04, but not in 20.04
RUN apt-get update && apt-get install -y \
apache2 \
curl \
gettext \
git \
libapache2-mod-php7.4 \
libapache2-mod-php8.0 \
locales \
php7.4 \
php7.4-curl \
php7.4-xsl \
php7.4-intl \
php7.4-mbstring \
php-apcu \
php-zip \
php8.0 \
php8.0-curl \
php8.0-xsl \
php8.0-intl \
php8.0-mbstring \
php8.0-apcu \
php8.0-zip \
unzip \
&& rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -55,7 +58,7 @@ ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8

# timezone
RUN sed -i 's/;date.timezone =/date.timezone = "UTC"/g' /etc/php/7.4/apache2/php.ini
RUN sed -i 's/;date.timezone =/date.timezone = "UTC"/g' /etc/php/8.0/apache2/php.ini

COPY dockerfiles/config/000-default.conf /etc/apache2/sites-available/000-default.conf

Expand Down

0 comments on commit 9bff3f1

Please sign in to comment.