-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·68 lines (49 loc) · 1.64 KB
/
Copy pathDockerfile
File metadata and controls
executable file
·68 lines (49 loc) · 1.64 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
FROM clearlinux/php-fpm:8.1.1 AS builder
ENV VERSION_ID 35680
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
RUN source /os-release
RUN mkdir /install_root
RUN swupd os-install -V $VERSION_ID \
--path /install_root --statedir /swupd-state \
--bundles=os-core-update,php-basic,curl --no-boot-update
RUN mkdir /os_core_install
COPY --from=clearlinux/os-core:latest / /os_core_install/
RUN cd / && \
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
FROM clearlinux/os-core:latest
COPY --from=builder /install_root /
RUN set -ex \
mkdir -p /var/www/html \
&& cd /usr/share/defaults/php \
&& { \
echo '[global]'; \
echo 'error_log = /proc/self/fd/2'; \
echo; echo '; https://github.com/docker-library/php/pull/725#issuecomment-443540114'; echo 'log_limit = 8192'; \
echo; \
echo '[www]'; \
echo '; if we send this to /proc/self/fd/1, it never appears'; \
echo 'access.log = /proc/self/fd/2'; \
echo; \
echo 'clear_env = no'; \
echo; \
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
echo 'catch_workers_output = yes'; \
echo 'decorate_workers_output = no'; \
} | tee php-fpm.d/docker.conf \
&& { \
echo '[global]'; \
echo 'daemonize = no'; \
echo; \
echo '[www]'; \
echo 'user = httpd'; \
echo 'group = httpd'; \
echo 'listen = 9000'; \
echo 'pm = dynamic'; \
} | tee php-fpm.d/zz-docker.conf
WORKDIR /var/www/html
COPY docker-php-entrypoint /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-php-entrypoint
ENTRYPOINT ["docker-php-entrypoint"]
STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]