-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
107 lines (83 loc) · 2.54 KB
/
Dockerfile
File metadata and controls
107 lines (83 loc) · 2.54 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#
# PHP
FROM nginx:bookworm AS base
MAINTAINER Mihai Stancu <mihai.stancu@neurony.ro>
ARG PHPVS
ENV PHPVS $PHPVS
ARG X_ARCH
ENV X_ARCH $X_ARCH
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV CRON_ENABLED 0
ENV DEBIAN_FRONTEND noninteractive
ENV DUMPER_ENABLED 0
ENV LANG en_US.UTF-8
ENV LC_ALL C.UTF-8
ENV NEWRELIC_ENABLED 0
ENV NGINX_ENVSUBST_TEMPLATE_SUFFIX .tpl
ENV NGINX_ENABLED 1
ENV PHPFPM_ENABLED 1
ENV TERM linux
ENV TZ UTC
ENV VAR_DUMPER_FORMAT server
COPY files/entrypoint.d /entrypoint.d
COPY files/etc/init.d/* /etc/init.d/
COPY files/etc/newrelic/ /etc/newrelic/
COPY files/etc/nginx/templates/* /etc/nginx/templates/
COPY files/etc/php/mods-available/* /etc/php/$PHPVS/mods-available/
COPY files/root/.bash* /root/
COPY files/opt /opt
COPY files/usr/local/bin /usr/local/bin
RUN add-php && clean-tmp;
# tini handles PID=1 @see https://github.com/krallin/tini
ENTRYPOINT ["tini", "--", "entrypoint"]
STOPSIGNAL SIGTERM
WORKDIR /app
# NGINX HTTP server
EXPOSE 80
# NGINX HTTPs server
EXPOSE 443
# PHP-FPM server
EXPOSE 9000
# Symfony Dump Server @see https://symfony.com/doc/current/components/var_dumper.html#the-dump-server
EXPOSE 9912
#
# PHP-DUMPER
FROM base AS dumper
MAINTAINER Mihai Stancu <mihai.stancu@neurony.ro>
ENV CRON_ENABLED 0
ENV DUMPER_ENABLED 1
ENV NEWRELIC_ENABLED 0
ENV NGINX_ENABLED 0
ENV PHPFPM_ENABLED 0
RUN cd /opt/var-dumper && composer install && clean-tmp;
#
# CLOUD-CLI
FROM base AS cloud-cli
MAINTAINER Mihai Stancu <mihai.stancu@neurony.ro>
ENV AZURE_CONFIG_DIR /etc/azure/
ENV CRON_ENABLED 0
ENV DUMPER_ENABLED 0
ENV NEWRELIC_ENABLED 0
ENV NGINX_ENABLED 0
ENV PHPFPM_ENABLED 0
COPY files/etc/azure /etc/azure
COPY files/etc/mysql /etc/mysql
RUN add-config && add-docker && add-az-cli && clean-tmp;
#
# PHP-QA
FROM base AS qa
MAINTAINER Mihai Stancu <mihai.stancu@neurony.ro>
ARG PHPVS
ENV PHPVS $PHPVS
ARG X_ARCH
ENV X_ARCH $X_ARCH
RUN add-qa && clean-tmp;
#
# PHP-FS
FROM qa AS fs
MAINTAINER Mihai Stancu <mihai.stancu@neurony.ro>
ARG NODEVS
ENV NODEVS $NODEVS
ARG X_ARCH
ENV X_ARCH $X_ARCH
RUN add-node && clean-tmp;