-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
executable file
·70 lines (55 loc) · 2.3 KB
/
Dockerfile.template
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
59
60
61
62
63
64
65
66
67
68
69
70
FROM bitnami/php-fpm:%%TAG%%
RUN install_packages \
file \
# required by wp ewwwio optimize https://docs.ewww.io/article/25-optimizing-with-wp-cli
less \
locales \
#FIXED "sh: 1: tput: not found" with kint-php
ncurses-bin \
patch \
rsync \
vim \
zip \
;
#### composer
#https://docs.php.earth/docker/composer/
#https://medium.com/@c.harrison/speedy-composer-installs-in-docker-builds-41eea6d0172b
#https://blog.martinhujer.cz/17-tips-for-using-composer-efficiently/
#https://github.com/composer/composer/issues/4892#issuecomment-328511850
#https://getcomposer.org/doc/articles/autoloader-optimization.md
#https://hackernoon.com/get-composer-to-run-on-docker-container-a-how-to-guide-y86g36z7
RUN install_packages \
ca-certificates \
curl \
git \
# used in some projects with repositories -> type: svn
subversion \
# As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension.
# This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost.
# Installing 'unzip' may remediate them.
unzip \
;
#### msmtp
# Looks like sSMTP is no longer maintained, MSMTP is the suggested replacement.
RUN install_packages \
ca-certificates \
curl \
msmtp \
;
#### supercronic
# Latest releases available at https://github.com/aptible/supercronic/releases
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.30/supercronic-linux-amd64 \
SUPERCRONIC=supercronic-linux-amd64 \
SUPERCRONIC_SHA1SUM=9f27ad28c5c57cd133325b2a66bba69ba2235799
RUN install_packages tzdata \
&& curl -fsSLO "$SUPERCRONIC_URL" \
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& chmod +x "$SUPERCRONIC" \
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
####
COPY entrypoint.sh /
#https://github.com/docker-library/postgres/issues/296#issuecomment-308735942
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "php-fpm", "-F", "--pid", "/opt/bitnami/php/tmp/php-fpm.pid", "-y", "/opt/bitnami/php/etc/php-fpm.conf" ]