-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
76 lines (60 loc) · 2.03 KB
/
Copy pathDockerfile
File metadata and controls
76 lines (60 loc) · 2.03 KB
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
FROM php:7.0-fpm
MAINTAINER Mark Shust <mark@shust.com>
RUN apt-get update && apt-get install -y \
cron \
git \
gzip \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libxslt1-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 \
mcrypt \
opcache \
pdo_mysql \
soap \
xsl \
zip
RUN pecl channel-update pecl.php.net
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/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 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