-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
124 lines (111 loc) · 2.5 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
FROM ubuntu:16.04
LABEL maintainer="[email protected]"
LABEL Name=php71-fpm
# Defaultts variables
ENV DEBIAN_FRONTEND=noninteractive \
PATH=/root/.composer/vendor/bin:$PATH \
COMPOSER_ALLOW_SUPERUSER=1
# base packages
RUN apt-get -y update && apt-get install -y \
apt-utils \
curl \
wget \
less \
vim \
git \
htop \
mc \
tmux \
dnsutils \
inetutils-ping \
jq \
supervisor \
cron \
logrotate \
software-properties-common
# PHP repo
RUN LC_ALL=C.UTF-8 apt-add-repository -y ppa:ondrej/php
# Main part
RUN apt-get update -y && apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y -f --no-install-recommends \
unzip \
bzip2 \
make \
autoconf \
re2c \
libc6-dev \
libpcre3-dev \
libssh2-1-dev \
libssl-dev \
libyaml-dev \
libgeoip-dev \
lsb-release \
php7.1-fpm \
php7.1-dev \
php7.1-common \
php7.1-cli \
php7.1-dba \
php7.1-gmp \
php7.1-gd \
php7.1-imagick \
php7.1-imap \
php7.1-mongodb \
php7.1-msgpack \
php7.1-odbc \
php7.1-pgsql \
php7.1-phalcon \
php7.1-pspell \
php7.1-recode \
php7.1-soap \
php7.1-tidy \
php7.1-fpm \
php7.1-xml \
php7.1-amqp \
php7.1-apcu-bc \
php7.1-igbinary \
php7.1-sodium \
php-pear \
php7.1-ssh2 \
php7.1-yaml \
php7.1-curl \
php7.1-intl \
php7.1-mbstring \
php7.1-mcrypt \
php7.1-mysql \
php7.1-zip \
php7.1-json \
php7.1-opcache \
php7.1-cgi \
php7.1-bcmath \
php7.1-redis \
php7.1-memcache \
php7.1-memcached \
php7.1-dom \
php7.1-geoip \
php7.1-xdebug \
nodejs \
npm
# Node dependencies
RUN ln -s /usr/bin/nodejs /usr/bin/node && npm install -g \
less
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
chmod +x /usr/local/bin/composer && \
composer --version --no-ansi
# Disable PHP-mods
RUN phpdismod -v 7.1 apcu_bc && \
phpdismod -v 7.1 apcu && \
phpdismod -v 7.1 mongodb && \
phpdismod -v 7.1 xdebug
# PHP dirs fix
RUN mkdir -p /run/php
RUN mkdir -p /var/log/php
COPY ./configs/supervisor /etc/supervisor
COPY ./configs/logrotate.conf /etc/logrotate.conf
COPY ./configs/php /etc/php/7.1
COPY ./entrypoint.sh /entrypoint.sh
COPY ./entrypoint.d /entrypoint.d
RUN chmod +x /entrypoint.sh
EXPOSE 9000
USER root
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-n"]