Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust packages and extensions in order to run on PHP 8.0 #51

Merged
merged 1 commit into from
May 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@
# docker build -f Dockerfile-dev -t api-tools .
# docker run -it -p "8080:80" -v $PWD:/var/www api-tools
#
FROM php:7.3-apache
FROM php:8.0-apache

RUN apt-get update \
&& apt-get install -y git libzip-dev \
&& apt-get install -y git libzip-dev libicu-dev \
&& docker-php-ext-install zip \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& a2enmod rewrite \
&& sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf \
&& mv /var/www/html /var/www/public \
&& curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not important, but we should probably use multi-stage here, pinning composer to a specific version:

FROM composer:2.3.3 AS get-composer
FROM php:8.0-apache

COPY --from=get-composer /usr/local/bin/composer /usr/local/bin/composer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll try it and create a PR then

&& echo "AllowEncodedSlashes On" >> /etc/apache2/apache2.conf

WORKDIR /var/www