File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ ARG FLAVOR=apache
77
88FROM ghcr.io/mlocati/php-extension-installer:2.7.24 AS ext-installer
99
10+ FROM --platform=$BUILDPLATFORM alpine AS supercronic
11+ ARG SUPERCRONIC_VERSION=v0.2.45
12+ ARG TARGETARCH
13+ RUN wget -O /usr/local/bin/supercronic "https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/supercronic-linux-${TARGETARCH}" \
14+ && chmod +x /usr/local/bin/supercronic
15+
1016FROM wordpress:cli-${CLI_VERSION}-php${PHP_VERSION} AS wp-cli-source
1117
1218FROM wordpress:${WORDPRESS_VERSION}-php${PHP_VERSION}-${FLAVOR} AS base
2632
2733FROM base
2834
35+ COPY --from=supercronic /usr/local/bin/supercronic /usr/local/bin/supercronic
2936COPY --from=wp-cli-source /usr/local/bin/wp /usr/local/bin/wp
3037ENV WP_CLI_ALLOW_ROOT=1
3138ENV PAGER=cat
@@ -49,6 +56,10 @@ RUN <<EOT
4956 php.ini-production
5057
5158 ln -s php.ini-production php.ini
59+
60+ apt-get update
61+ apt-get install -y s6
62+ rm -rf /var/lib/apt/lists/*
5263EOT
5364
5465ENV PHP_MAX_EXECUTION_TIME=30
6576
6677COPY --from=config-file /wp-config-docker.php /usr/src/wordpress/wp-config-docker.php
6778COPY --chown=www-data:www-data wp-content /usr/src/wordpress/wp-content
79+ COPY rootfs /
80+
81+ ENTRYPOINT []
82+ CMD ["/usr/bin/s6-svscan" , "/etc/s6/services" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ cd /var/www/html
3+ exec docker-entrypoint.sh apache2-foreground
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ cd /var/www/html
3+ exec s6-setuidgid www-data supercronic --quiet /etc/supercronic/wordpress
Original file line number Diff line number Diff line change 1+ * * * * * wp cron event run --due-now
Original file line number Diff line number Diff line change 1+ define('DISABLE_WP_CRON', getenv_docker('DISABLE_WP_CRON', true));
2+
13/* C3 Cloudfront Clear Cache envs */
24define('AWS_ACCESS_KEY_ID', getenv_docker('AWS_ACCESS_KEY_ID', null));
35define('AWS_SECRET_ACCESS_KEY', getenv_docker('AWS_SECRET_ACCESS_KEY', null));
You can’t perform that action at this time.
0 commit comments