-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
81 lines (70 loc) · 2.69 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
FROM php:7.3-fpm
MAINTAINER Ihor Furseyev <i.furseyev@atwix.com>
# Pre-repository setup: Add support for HTTPS repositories
RUN apt-get update -q; \
apt-get install -qy apt-transport-https
# Instal gnupg
RUN apt-get install -qy gnupg
# Repository: Yarn package manager
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
COPY ./config/etc/apt/sources.list.d/yarn.list /etc/apt/sources.list.d/yarn.list
# Repository: Node.js
RUN curl -sS https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
COPY ./config/etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list
# Upgrade/install packages
RUN apt-get update -q; \
apt-get upgrade -qy; \
DEBIAN_FRONTEND=noninteractive apt-get install -qy \
bash supervisor \
build-essential \
curl htop git vim wget \
nginx-extras mariadb-client redis-tools \
nullmailer mailutils \
nodejs yarn \
ruby ruby-dev rake \
libxml2-utils \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libxml2-dev libxslt1-dev \
zlib1g-dev \
libzip-dev
RUN docker-php-ext-install -j$(nproc) bcmath intl opcache pdo_mysql soap xsl zip iconv sockets
RUN pecl install mcrypt-1.0.3
RUN docker-php-ext-enable mcrypt
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
RUN pecl install xdebug-2.9.2
RUN apt-get clean -qy; \
rm -f /etc/nginx/sites-enabled/default; \
ln -sf /dev/stdout /var/log/nginx/access.log; \
ln -sf /dev/stderr /var/log/nginx/error.log; \
rm -rf /var/lib/apt; \
rm -rf /usr/src/php
# Install extra helper stuff
COPY src/wait-for-port /usr/local/bin/wait-for-port
RUN curl -sL https://getcomposer.org/download/1.10.10/composer.phar -o /usr/local/bin/composer
RUN chmod +x /usr/local/bin/composer
RUN curl -sL https://files.magerun.net/n98-magerun2-2.1.2.phar -o /usr/local/bin/n98-magerun2
RUN chmod +x /usr/local/bin/n98-magerun2
# Install config files and tester site
COPY ./config/nginx /etc/nginx
COPY ./config/php /usr/local/etc/php
COPY ./config/php-fpm /usr/local/etc/php-fpm.d
COPY ./config/supervisor/conf.d /etc/supervisor/conf.d
COPY ./tester /usr/share/nginx/tester
# nullmailer
RUN rm -f /var/spool/nullmailer/trigger; \
mkfifo /var/spool/nullmailer/trigger; \
chown mail:root /var/spool/nullmailer/trigger; \
chmod 0622 /var/spool/nullmailer/trigger
# Set working directory
RUN chown -R www-data:www-data /var/www
WORKDIR /var/www
# Default command
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
# Expose ports
EXPOSE 80