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

feat: add new php8latest to the matrix #8708 #13

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
php:
- php7
- php8
- php8latest

steps:
- name: GitHub Environment Variables Action
Expand Down
84 changes: 84 additions & 0 deletions Dockerfile.php8latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
FROM php:8.4-apache

EXPOSE 80

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2/apache2.pid
ENV APACHE_SERVER_NAME php-docker-base-linkorb

COPY ./php.ini-production "$PHP_INI_DIR/php.ini"

COPY ./apache2.conf /etc/apache2/apache2.conf
COPY ./apache-vhost.conf /etc/apache2/sites-available/000-default.conf
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
COPY --from=composer /usr/bin/composer /usr/bin/composer

RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
curl \
git \
gosu \
iputils-ping \
joe \
jq \
libbz2-dev \
openssh-client \
software-properties-common \
telnet \
unzip \
vim \
zip \
ca-certificates \
gnupg \
tidy \
wkhtmltopdf \
pdftk \
libxml2-dev \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*


ENV NODE_MAJOR=20
# Based on nodesource installation instructions https://github.com/nodesource/distributions#installation-instructions
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install nodejs -y \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg \
| gpg --dearmor >> /usr/share/keyrings/yarnkey.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install yarn \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN docker-php-ext-install bz2 \
&& install-php-extensions apcu gd gmp intl opcache pdo_mysql pdo_pgsql sockets zip imap mailparse soap mysqli bcmath \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /app/config/secrets/dev \
&& mkdir -p /app/public/build \
&& chown -R www-data:www-data /app \
&& chown -R www-data:www-data /var/www \
&& a2enmod rewrite \
&& a2enmod headers

COPY --chown=www-data:www-data index.html /app

WORKDIR /app

USER root