Skip to content

Commit 7241e44

Browse files
committed
Add frankenphp support
1 parent 7e10c15 commit 7241e44

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/build-publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ jobs:
6161
tags: |
6262
insready/drupal-dev:11
6363
insready/drupal-dev:latest
64+
-
65+
name: Build and push - FrankenPHP D11
66+
id: docker_build_frankenphp_11
67+
uses: docker/build-push-action@v4
68+
continue-on-error: true
69+
with:
70+
context: ./frankkenphp/
71+
push: true
72+
tags: |
73+
insready/drupal-dev:frankkenphp
6474
-
6575
name: Build and push - ContentaCMS
6676
id: docker_build_contenta

frankkenphp/Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM dunglas/frankenphp:1-php8.4
2+
3+
# install the PHP extensions we need
4+
RUN apt-get update \
5+
&& apt-get install -y git mariadb-client wget nano pv gpg \
6+
&& rm -rf /var/lib/apt/lists/*
7+
8+
RUN install-php-extensions \
9+
apcu \
10+
gd \
11+
opcache \
12+
pdo_mysql \
13+
zip
14+
15+
COPY --from=drupal:php8.4 /opt/drupal /opt/drupal
16+
COPY --from=drupal:php8.4 /usr/local/etc/php/conf.d/* /usr/local/etc/php/conf.d/
17+
18+
COPY --from=composer/composer:2-bin /composer /usr/local/bin/
19+
20+
# https://github.com/docker-library/drupal/pull/259
21+
# https://github.com/moby/buildkit/issues/4503
22+
# https://github.com/composer/composer/issues/11839
23+
# https://github.com/composer/composer/issues/11854
24+
# https://github.com/composer/composer/blob/94fe2945456df51e122a492b8d14ac4b54c1d2ce/src/Composer/Console/Application.php#L217-L218
25+
ENV COMPOSER_ALLOW_SUPERUSER 1
26+
27+
WORKDIR /opt/drupal
28+
COPY Caddyfile /etc/caddy/Caddyfile
29+
RUN set -eux; \
30+
chown -R www-data:www-data web/sites web/modules web/themes; \
31+
rm -rf /app/public; \
32+
ln -sf /opt/drupal/web /app/public; \
33+
echo "\$settings['trusted_host_patterns'] = ['^' . preg_quote(\$_SERVER['SERVER_NAME'] ?? 'localhost', '/') . '\$'];" >> /opt/drupal/web/sites/default/default.settings.php; \
34+
cp /opt/drupal/web/sites/default/default.settings.php /opt/drupal/web/sites/default/settings.php
35+
36+
ENV PATH=${PATH}:/opt/drupal/vendor/bin

0 commit comments

Comments
 (0)