-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
177 lines (157 loc) · 5.93 KB
/
Dockerfile
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
FROM alpine:3.21.2
RUN apk upgrade && rm -rf /var/cache/apk/*
ENV \
PHP_NAME=php83 \
PHP_CONFIG_DIR=/etc/php83
RUN apk update \
&& apk add \
"${PHP_NAME}"-fpm \
ca-certificates \
curl \
nginx \
openssl \
icu-data-full \
gnu-libiconv \
"${PHP_NAME}"-ctype \
"${PHP_NAME}"-curl \
"${PHP_NAME}"-dom \
"${PHP_NAME}"-gettext \
"${PHP_NAME}"-gd \
"${PHP_NAME}"-gmp \
"${PHP_NAME}"-iconv \
"${PHP_NAME}"-intl \
"${PHP_NAME}"-json \
"${PHP_NAME}"-ldap \
"${PHP_NAME}"-mbstring \
"${PHP_NAME}"-openssl \
"${PHP_NAME}"-pcntl \
"${PHP_NAME}"-pdo_mysql \
"${PHP_NAME}"-pdo_pgsql \
"${PHP_NAME}"-pear \
"${PHP_NAME}"-pgsql \
"${PHP_NAME}"-phar \
"${PHP_NAME}"-posix \
"${PHP_NAME}"-session \
"${PHP_NAME}"-sockets \
"${PHP_NAME}"-simplexml \
"${PHP_NAME}"-tokenizer \
"${PHP_NAME}"-xml \
"${PHP_NAME}"-pecl-redis \
"${PHP_NAME}"-pecl-yaml \
"${PHP_NAME}"-pecl-xdebug \
yaml \
&& mv "${PHP_CONFIG_DIR}"/conf.d/50_xdebug.ini "${PHP_CONFIG_DIR}"/conf.d/50_xdebug.ini.orig \
&& php -m \
&& rm -rf /var/cache/apk/*
#RUN (echo "en_US.UTF-8 UTF-8"; echo "de_DE.UTF-8 UTF-8"; echo "fr_FR.UTF-8 UTF-8") >> /etc/locale.gen \
# && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
RUN cd "${PHP_CONFIG_DIR}" \
&& echo 'date.timezone = UTC' > conf.d/timezone.ini \
&& { \
echo 'zend_extension=/usr/lib/${PHP_NAME}/modules/xdebug.so'; \
echo; \
echo '[Xdebug]'; \
echo 'xdebug.remote_enable=true'; \
echo 'xdebug.remote_connect_back=true'; \
echo 'xdebug.profiler_enable=0'; \
echo 'xdebug.profiler_output_dir=/tmp/profile'; \
echo 'xdebug.profiler_enable_trigger=1'; \
} | tee conf.d/xdebug.ini.disabled \
&& { \
echo '[global]'; \
echo 'error_log = /proc/self/fd/2'; \
echo 'log_level = warn'; \
echo; \
echo '[www]'; \
echo 'access.log = /dev/null'; \
echo; \
echo 'clear_env = no'; \
echo; \
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
echo 'catch_workers_output = yes'; \
} | tee php-fpm.d/docker.conf \
&& { \
echo '; Session paths for a volume '; \
echo 'session.save_path = "/sessions"'; \
} | tee conf.d/docker.ini \
&& { \
echo '[global]'; \
echo 'daemonize = no'; \
echo; \
echo '[www]'; \
echo 'listen = /run/php-fpm.sock'; \
echo 'listen.owner = nginx'; \
echo 'listen.group = nginx'; \
} | tee php-fpm.d/zz-docker.conf \
&& php -m \
&& mkdir /sessions \
&& chown nobody:nobody /sessions
VOLUME /sessions
# renovate: datasource=github-releases depName=Icinga/icingaweb2
ENV ICINGAWEB_VERSION=v2.12.2
# renovate: datasource=github-releases depName=Icinga/icinga-php-library
ENV ICINGA_PHP_LIBRARY_VERSION=v0.14.1
# renovate: datasource=github-releases depName=Icinga/icinga-php-thirdparty
ENV ICINGA_PHP_THIRDPARTY_VERSION=v0.12.1
# renovate: datasource=github-releases depName=Icinga/icingadb-web
ENV ICINGA_ICINGADB_VERSION=v1.1.3
# ENV ICINGA_ICINGADB_GIT_REF=e14cf93de42f9efc41c098469f84cb7c2a3cfc08
# renovate: datasource=github-releases depName=Icinga/icingaweb2-module-director
ENV ICINGA_DIRECTOR_VERSION=v1.11.3
# renovate: datasource=github-releases depName=Icinga/icingaweb2-module-fileshipper
ENV ICINGA_FILESHIPPER_VERSION=v1.2.0
# renovate: datasource=github-releases depName=Icinga/icingaweb2-module-ipl
ENV ICINGA_IPL_VERSION=v0.5.0
# renovate: datasource=github-releases depName=Icinga/icingaweb2-module-incubator
ENV ICINGA_INCUBATOR_VERSION=v0.22.0
# renovate: datasource=github-releases depName=Icinga/icingaweb2-module-reactbundle
ENV ICINGA_REACTBUNDLE_VERSION=v0.9.0
RUN curl -o /tmp/icingaweb2.tar.gz -SL "https://github.com/Icinga/icingaweb2/archive/${ICINGAWEB_VERSION}.tar.gz" \
&& mkdir /usr/share/icingaweb2 \
&& tar xf /tmp/icingaweb2.tar.gz --strip-components=1 -C /usr/share/icingaweb2 \
&& rm -f /tmp/icingaweb2.tar.gz \
&& ln -s /usr/share/icingaweb2/bin/icingacli /usr/local/bin/icingacli
RUN curl -o /tmp/download.tar.gz -SL "https://github.com/Icinga/icinga-php-library/archive/${ICINGA_PHP_LIBRARY_VERSION}.tar.gz" \
&& mkdir -p /usr/share/icinga-php/ipl \
&& tar xf /tmp/download.tar.gz --strip-components=1 -C /usr/share/icinga-php/ipl \
&& rm -f /tmp/download.tar.gz
RUN curl -o /tmp/download.tar.gz -SL "https://github.com/Icinga/icinga-php-thirdparty/archive/${ICINGA_PHP_THIRDPARTY_VERSION}.tar.gz" \
&& mkdir -p /usr/share/icinga-php/vendor \
&& tar xf /tmp/download.tar.gz --strip-components=1 -C /usr/share/icinga-php/vendor \
&& rm -f /tmp/download.tar.gz
# icingadb dev - disabled because of incompatiblity with 2.8
#RUN apk add -U git \
# && git clone https://github.com/Icinga/icingadb-web.git /usr/share/icingaweb2/modules/icingadb \
# && cd /usr/share/icingaweb2/modules/icingadb \
# && git checkout -B local "${ICINGA_ICINGADB_GIT_REF}" \
# && git describe --tags
# newer module names
RUN for module in icingadb; do \
version="ICINGA_$(echo "${module}" | tr '[a-z]' '[A-Z]')_VERSION" \
&& curl -o /tmp/module.tar.gz -LS \
"https://github.com/Icinga/${module}-web/archive/$(eval echo \$$version).tar.gz" \
&& mkdir "/usr/share/icingaweb2/modules/${module}" \
&& tar xf /tmp/module.tar.gz --strip-components=1 -C "/usr/share/icingaweb2/modules/${module}" \
&& rm -f /tmp/module.tar.gz \
;done
# old module names
RUN for module in director fileshipper ipl incubator reactbundle; do \
version="ICINGA_$(echo "${module}" | tr '[a-z]' '[A-Z]')_VERSION" \
&& curl -o /tmp/module.tar.gz -LS \
"https://github.com/Icinga/icingaweb2-module-${module}/archive/$(eval echo \$$version).tar.gz" \
&& mkdir "/usr/share/icingaweb2/modules/${module}" \
&& tar xf /tmp/module.tar.gz --strip-components=1 -C "/usr/share/icingaweb2/modules/${module}" \
&& rm -f /tmp/module.tar.gz \
;done
# RUN mkdir /etc/icingaweb2 \
# && chown nobody.nobody /etc/icingaweb2 \
# && mkdir /var/lib/icingaweb2 \
# && chown nobody.nobody /etc/icingaweb2
COPY root/ /
VOLUME /etc/icingaweb2
VOLUME /var/lib/icingaweb2
WORKDIR /etc/icingaweb2
EXPOSE 80
ENTRYPOINT ["docker-entrypoint"]
CMD ["nginx-with-php"]
# vi: ts=4 sw=4 noexpandtab