-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
81 lines (64 loc) · 2.47 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
LABEL maintainer="Mage2click"
RUN apt-get update && apt-get install -y \
apt-utils \
cron \
git \
gzip \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libxslt1-dev \
libzip-dev \
lsof \
mysql-client \
vim \
zip
RUN docker-php-ext-configure \
gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
RUN docker-php-ext-install \
bcmath \
gd \
intl \
mbstring \
opcache \
pdo_mysql \
soap \
xsl \
zip
RUN pecl channel-update pecl.php.net \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& sed -i -e 's/^zend_extension/\;zend_extension/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN apt-get install -y libssh2-1-dev \
&& pecl install ssh2-1.1.2 \
&& docker-php-ext-enable ssh2
RUN curl -sS https://getcomposer.org/installer | \
php -- --install-dir=/usr/local/bin --filename=composer
RUN groupadd -g 1000 app \
&& useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app
RUN apt-get install -y gnupg \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get install -y nodejs \
&& mkdir /var/www/.config /var/www/.npm \
&& chown app:app /var/www/.config /var/www/.npm \
&& ln -s /var/www/html/node_modules/grunt/bin/grunt /usr/bin/grunt
RUN apt-get -y install golang-go \
&& mkdir /opt/go \
&& export GOPATH=/opt/go \
&& go get github.com/mailhog/mhsendmail
RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/update/cron.php\n' >> /etc/crontab
RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento cron:run\n' >> /etc/crontab
RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento setup:cron:run\n#\n' >> /etc/crontab
COPY conf/www.conf /usr/local/etc/php-fpm.d/
COPY conf/php.ini /usr/local/etc/php/
COPY conf/php-fpm.conf /usr/local/etc/
COPY bin/cronstart /usr/local/bin/
RUN mkdir /sock
RUN chown -R app:app /usr/local/etc/php/conf.d /sock
USER app:app
VOLUME /var/www
WORKDIR /var/www/html
EXPOSE 9001