-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
31 lines (25 loc) · 1.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM dunglas/frankenphp:1-php8.3
RUN install-php-extensions \
apcu \
gd \
opcache \
pdo_mysql \
zip
COPY --from=drupal:php8.3 /opt/drupal /opt/drupal
COPY --from=drupal:php8.3 /usr/local/etc/php/conf.d/* /usr/local/etc/php/conf.d/
COPY --from=composer/composer:2-bin /composer /usr/local/bin/
# https://github.com/docker-library/drupal/pull/259
# https://github.com/moby/buildkit/issues/4503
# https://github.com/composer/composer/issues/11839
# https://github.com/composer/composer/issues/11854
# https://github.com/composer/composer/blob/94fe2945456df51e122a492b8d14ac4b54c1d2ce/src/Composer/Console/Application.php#L217-L218
ENV COMPOSER_ALLOW_SUPERUSER 1
WORKDIR /opt/drupal
COPY Caddyfile /etc/caddy/Caddyfile
RUN set -eux; \
chown -R www-data:www-data web/sites web/modules web/themes; \
rm -rf /app/public; \
ln -sf /opt/drupal/web /app/public; \
echo "\$settings['trusted_host_patterns'] = ['^' . preg_quote(\$_SERVER['SERVER_NAME'] ?? 'localhost', '/') . '\$'];" >> /opt/drupal/web/sites/default/default.settings.php; \
cp /opt/drupal/web/sites/default/default.settings.php /opt/drupal/web/sites/default/settings.php
ENV PATH=${PATH}:/opt/drupal/vendor/bin