-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-8.1-apache
113 lines (101 loc) · 3.55 KB
/
Dockerfile-8.1-apache
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
FROM php:8.1-apache
ENV DEBIAN_FRONTEND=noninteractive \
COMPOSER_ALLOW_SUPERUSER=1 \
PHP_USER_ID=33 \
PHP_ENABLE_XDEBUG=0 \
PATH=/app:/app/vendor/bin:/root/.composer/vendor/bin:$PATH \
TERM=linux \
VERSION_PANDOC=2.11.4
RUN set -ex \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
git curl apt-utils \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN set -ex \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
rsync tar xz-utils dnsutils ssl-cert binutils \
net-tools iproute2 \
pv zsh \
graphviz \
# pdf
ghostscript qpdf poppler-utils \
# imap
libc-client-dev libkrb5-dev \
# webp and gd
webp libwebp-dev libjpeg62-turbo-dev libpng-dev libxpm-dev libfreetype6-dev zlib1g-dev \
# magic
imagemagick libcurl3-dev libicu-dev libfreetype6-dev libjpeg-dev libjpeg62-turbo-dev libonig-dev libmagickwand-dev libpq-dev libpng-dev \
# async
libevent-dev libuv1-dev \
# ssh2
libssh2-1-dev \
# other good stuff from yii2-docker
libxml2-dev libxslt-dev libzip-dev zlib1g-dev default-mysql-client openssh-client nano unzip libcurl4-openssl-dev libssl-dev \
&& chsh -s /usr/bin/zsh \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN set -ex \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
wkhtmltopdf \
&& curl -Ls "https://github.com/jgm/pandoc/releases/download/${VERSION_PANDOC}/pandoc-${VERSION_PANDOC}-1-amd64.deb" -o /tmp/pandoc.deb \
&& apt-get install /tmp/pandoc.deb \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN set -ex \
&& git clone --recursive https://github.com/adsr/phpspy.git \
&& cd phpspy \
&& make \
&& cp phpspy /usr/bin/ \
&& cd .. \
&& rm -rf phpspy
RUN set -ex \
&& docker-php-source extract \
&& docker-php-ext-configure gd \
--enable-gd \
--with-freetype \
--with-jpeg \
--with-webp \
&& docker-php-ext-install \
gd \
&& docker-php-ext-configure imap \
--with-kerberos \
--with-imap-ssl \
&& docker-php-ext-install \
imap \
&& docker-php-ext-install \
pcntl posix sockets ffi \
soap zip curl bcmath exif \
iconv intl mbstring opcache \
pdo_mysql pdo_pgsql \
xml xsl \
&& pecl install \
# event redis imagick igbinary ast xdebug swoole \
redis imagick-beta igbinary ast xdebug swoole \
&& docker-php-ext-enable \
# event redis imagick igbinary ast \
redis imagick igbinary ast \
&& rm -rf /tmp/* \
&& docker-php-source delete
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s "https://blackfire.io/api/v1/releases/probe/php/linux/amd64/{$version}" \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
# RUN a2enmod rewrite headers ssl
RUN a2enmod rewrite headers
COPY copy /
RUN curl -sfL git.io/antibody | sh -s - -b /usr/local/bin \
&& antibody bundle < /root/.zsh_plugins.txt > /root/.zsh_plugins.sh \
&& zsh /root/setup.zsh
# Add GITHUB_API_TOKEN support for composer
RUN chmod 700 \
/usr/local/bin/docker-php-entrypoint \
/usr/local/bin/composer \
# Install composer
&& curl -sS https://getcomposer.org/installer | php -- \
--filename=composer.phar \
--install-dir=/usr/local/bin \
&& composer clear-cache
WORKDIR /app