-
Notifications
You must be signed in to change notification settings - Fork 114
/
Dockerfile.cli.twig
66 lines (60 loc) · 2.5 KB
/
Dockerfile.cli.twig
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
FROM php:{{ php_version }}-cli
ENV DEBIAN_FRONTEND=noninteractive
ENV TERM=xterm-color
ARG DEV_MODE
ENV DEV_MODE=$DEV_MODE
COPY --from=composer:{{ composer.version }} /usr/bin/composer /usr/bin/
COPY ./rootfilesystem/ /
RUN \
set -ex && \
apt-get update && \
apt-get install -y \
{%~ if inotify == true %}
# The auto-reloading feature is supported for non-Alpine images only.
#
# Package "inotify-tools" is pre-installed in latest non-Alpine images. For versioned non-Alpine images, it will be
# installed automatically when needed. For details, please check script "autoreload.sh" and example "00-autoreload".
#
# @see https://github.com/swoole/docker-swoole/blob/master/rootfilesystem/usr/local/boot/autoreload.sh
# @see https://github.com/swoole/docker-swoole/tree/master/examples/00-autoreload
inotify-tools \
{%~ endif %}
{%~ if option_curl == true %}
libcurl4-openssl-dev \
{%~ endif %}
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
unzip \
zlib1g-dev \
--no-install-recommends && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
{%~ if php_extensions is not empty %}
pecl channel-update pecl.php.net && \
{%~ for name, data in php_extensions %}
{%~ if data.configureoptions is empty %}
pecl install {{ name }}{% if data.version is not empty %}-{{ data.version }}{% endif %} && \
{%~ else %}
pecl install --configureoptions '{{ data.configureoptions }}' {{ name }}{% if data.version is not empty %}-{{ data.version }}{% endif %} && \
{%~ endif %}
{%~ endfor %}
# PHP extension Redis is included since 4.8.12+ and 5.0.1+.
{%~ for name, data in php_extensions %}
{%~ if data.enabled %}
docker-php-ext-enable {{ name }} && \
{%~ endif %}
{%~ endfor %}
{%~ endif %}
install-swoole.sh {% if swoole_version == "nightly" %}master{% else %}{{ swoole_version }}{% endif %} \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets {% if option_curl == true %}--enable-swoole-curl {% endif %}{% if option_json == true %}--enable-swoole-json {% endif %}&& \
mkdir -p /var/log/supervisor && \
rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static
ENTRYPOINT ["/entrypoint.sh"]
CMD []
WORKDIR "/var/www/"