wordpress/Dockerfile

46 lines
1.0 KiB
Docker
Raw Normal View History

2023-01-21 03:03:19 +01:00
ARG PHP_VERSION=8.1
2022-11-02 21:42:06 +01:00
ARG WP_VERSION=6.1.0
2020-03-29 01:42:21 +01:00
# WP CLI
FROM --platform=${TARGETPLATFORM} wordpress:cli-php${PHP_VERSION} AS wp-cli
2020-03-29 01:42:21 +01:00
# Build rootfs
FROM scratch AS rootfs
# Install wp-cli
COPY --from=wp-cli ["/usr/local/bin/wp", "/usr/local/bin/wp-cli"]
2020-03-29 01:42:21 +01:00
# Overlay
COPY ["./rootfs/", "/"]
# Configuration and patches
ARG WP_VERSION
COPY ["wp-config.php", "/var/www/html/"]
COPY ["patches/${WP_VERSION}/wp-admin-update-core.patch", "/etc/wp-mods/"]
# Stage 3 - Final
FROM --platform=${TARGETPLATFORM} nlss/wordpress-unit-base:1.0.0
RUN apk add --update --no-cache patch
2020-03-29 01:42:21 +01:00
COPY --from=rootfs ["/", "/"]
2022-01-15 00:05:18 +01:00
RUN chmod a+x /usr/local/bin/wp
2020-03-29 01:42:21 +01:00
ARG WP_VERSION
ENV WP_VERSION="${WP_VERSION}"
ARG WP_LOCALE="en_US"
ENV WP_LOCALE=${WP_LOCALE}
ENV ENFORCE_DISABLE_WP_UPDATES=true
ENV WP_CLI_DISABLE_AUTO_CHECK_UPDATE=true
ENV CRON_ENABLED=true
2023-01-23 19:50:30 +01:00
WORKDIR "/var/www/html/"
VOLUME ["/root/.wp-cli", "/var/www/html", "/var/www/html/wp-content"]
2023-01-21 02:51:41 +01:00
LABEL maintainer="Aleksandar Puharic <aleksandar@puharic.com>"
ENTRYPOINT ["/init"]
2021-01-11 20:31:23 +01:00
EXPOSE 80/TCP