-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (45 loc) · 2.04 KB
/
Copy pathDockerfile
File metadata and controls
58 lines (45 loc) · 2.04 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
49
50
51
52
53
54
55
56
57
58
################################################################################
# These setups are part of the project: https://code.shin.company/php
# Please respect the intellectual effort that went into creating them.
# If you use or copy these ideas, proper credit would be appreciated.
# - Author: Mai Nhut Tan <shin@shin.company>
# - License: https://code.shin.company/php/blob/main/LICENSE
################################################################################
ARG PHP_VERSION="8.4"
ARG PHP_VARIANT=""
ARG DEBUG
FROM shinsenter/php:${PHP_VERSION}-fpm-nginx-alpine
ENV WP_VERSION=7.0
# Enable SBOM attestations
# See: https://docs.docker.com/build/attestations/sbom/
ARG BUILDKIT_SBOM_SCAN_CONTEXT=true
ARG BUILDKIT_SBOM_SCAN_STAGE=true
################################################################################
ARG BUILD_FROM_IMAGE="shinsenter/phpfpm-apache"
ARG BUILD_TAG_PREFIX=""
################################################################################
COPY ./rootfs/ /
################################################################################
# https://wordpress.org/documentation/category/installation/
ENV DOCUMENT_ROOT=""
ENV DISABLE_AUTORUN_GENERATING_INDEX=1
ENV APP_PATH=/var/www/html
# recommended PHP configuration limits
ENV PHP_MAX_EXECUTION_TIME="600"
ENV PHP_MAX_INPUT_TIME="400"
ENV PHP_MAX_INPUT_VARS="1000"
ENV PHP_MEMORY_LIMIT="256M"
ENV PHP_POST_MAX_SIZE="48M"
ENV PHP_UPLOAD_MAX_FILESIZE="32M"
################################################################################
# installs wp-cli
ARG WPCLI_URL=https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
ARG WPCLI_PATH=/usr/local/bin/wp-cli
# hadolint ignore=DL3059
RUN /root/setup-wp-cli.sh
# hadolint ignore=DL3059
RUN hook create-project
RUN phpaddmod imagick memcache && apk update && apk upgrade --no-cache && rm -Rf /tmp/*
################################################################################
ONBUILD RUN hook onbuild
################################################################################