-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (34 loc) · 1.48 KB
/
Dockerfile
File metadata and controls
48 lines (34 loc) · 1.48 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# syntax = docker/dockerfile:1.0-experimental
ARG nginx_version
ARG php_version
FROM nginx:${nginx_version:-latest} as nginx
LABEL uk.org.kodo.maintainer = "Dom Sekotill <dom.sekotill@kodo.org.uk>"
COPY data/nginx /etc/nginx
FROM php:${php_version:+$php_version-}fpm-alpine as deps
RUN --mount=type=bind,source=scripts/install-deps.sh,target=/stage /stage
FROM deps as compile
RUN --mount=type=bind,source=scripts/install-build-deps.sh,target=/stage /stage
RUN --mount=type=bind,source=scripts/compile-dist-ext.sh,target=/stage /stage
ARG imagick_version
RUN --mount=type=bind,source=scripts/compile-imagick.sh,target=/stage \
/stage ${imagick_version}
FROM deps as fastcgi
LABEL uk.org.kodo.maintainer "Dom Sekotill <dom.sekotill@kodo.org.uk>"
WORKDIR /app
ENV WORDPRESS_ROOT=/app
COPY --from=compile /usr/local/etc/php /usr/local/etc/php
COPY --from=compile /usr/local/lib/php /usr/local/lib/php
COPY scripts/wp.sh /usr/local/bin/wp
COPY data/composer.json /app/composer.json
ARG wp_version=latest
RUN --mount=type=bind,source=scripts/install-wp.sh,target=/stage \
/stage ${wp_version}
COPY plugins/* wp-content/mu-plugins/
COPY data/fpm.conf /usr/local/etc/php-fpm.d/image.conf
COPY data/opcache.ini /usr/local/etc/php/conf.d/opcache-recommended.ini
COPY data/wp-config.php /usr/share/wordpress/wp-config.php
COPY scripts/entrypoint.sh /bin/entrypoint
# PAGER is used by the wp-cli tool, the default 'less' is not installed
ENV PAGER=more
ENTRYPOINT ["/bin/entrypoint"]
CMD ["php-fpm"]