-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.cli.twig
57 lines (50 loc) · 2.07 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
FROM php:{{ php_version }}-cli
ENV DEBIAN_FRONTEND noninteractive
ENV TERM xterm-color
ARG DEV_MODE
ENV DEV_MODE $DEV_MODE
ENV TINI_VERSION v0.19.0
RUN dpkgArch="$(dpkg --print-architecture)" && curl -s -L -o /tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${dpkgArch}
RUN chmod +x /tini
COPY ./rootfilesystem/ /
RUN \
curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
chmod +x /usr/bin/composer && \
composer self-update {{ composer.version }} && \
apt-get update && \
apt-get install -y \
{%~ if inotify == true %}
inotify-tools \
{%~ endif %}
{%~ if option_curl == true %}
libcurl4-openssl-dev \
{%~ endif %}
{% if option_postgres == true %}
libpq-dev \
{% endif %}
libssl-dev \
supervisor \
unzip \
zlib1g-dev \
--no-install-recommends && \
{%~ if php_extensions is not empty %}
pecl update-channels && \
{%~ for name, data in php_extensions %}
pecl install {{ name }}{% if data.version is not empty %}-{{ data.version }}{% endif %} && \
{%~ endfor %}
{%~ for name, data in php_extensions %}
{%~ if data.enabled %}
docker-php-ext-enable {{ name }} && \
{%~ endif %}
{%~ endfor %}
{%~ endif %}
install-swoole.sh {% if swoole_version == "latest" %}{{ latest_version }}{% else %}{{ swoole_version }}{% endif %} \
--enable-http2 \
--enable-mysqlnd \
--enable-openssl \
--enable-sockets {% if option_curl == true %}--enable-hook-curl {% endif %}{% if option_postgres == true %}--with-postgres {% endif %}&& \
mkdir -p /var/log/supervisor && \
rm -rf /var/lib/apt/lists/* $HOME/.composer/*-old.phar /usr/bin/qemu-*-static
ENTRYPOINT ["/tini", "-g", "--", "/entrypoint.sh"]
CMD []
WORKDIR "/var/www/"