forked from clean-docker/Magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·92 lines (74 loc) · 1.99 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
FROM php:7.2-apache
MAINTAINER Viktor <[email protected]>
ENV XDEBUG_PORT 9000
# Install System Dependencies
RUN apt-get update \
&& apt-get install -y \
libfreetype6-dev \
libicu-dev \
libssl-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libedit-dev \
libedit2 \
libxslt1-dev \
apt-utils \
gnupg \
redis-tools \
mysql-client \
git \
mc \
mcedit \
wget \
curl \
lynx \
psmisc \
unzip \
tar \
cron \
bash-completion \
&& apt-get clean
# Configure the gd library
RUN docker-php-ext-configure \
gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
# Install Magento Dependencies
RUN docker-php-ext-install \
opcache \
gd \
bcmath \
intl \
iconv \
mbstring \
pdo_mysql \
soap \
xsl \
xml \
zip
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
RUN composer global require hirak/prestissimo
ENV PATH="/var/www/.composer/vendor/bin/:${PATH}"
# Install Xdebug (but don't enable)
RUN yes | pecl install xdebug && \
echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.iniOLD
# Install Mhsendmail
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install golang-go \
&& mkdir /opt/go \
&& export GOPATH=/opt/go \
&& go get github.com/mailhog/mhsendmail
# Configuring system
ADD .docker/config/php.ini /usr/local/etc/php/php.ini
ADD .docker/config/magento.conf /etc/apache2/sites-available/magento.conf
ADD .docker/config/custom-xdebug.ini /usr/local/etc/php/conf.d/custom-xdebug.ini
COPY .docker/bin/* /usr/local/bin/
COPY .docker/users/* /var/www/
RUN chmod +x /usr/local/bin/*
RUN ln -s /etc/apache2/sites-available/magento.conf /etc/apache2/sites-enabled/magento.conf
RUN chmod 777 -Rf /var/www /var/www/.* \
&& chown -Rf www-data:www-data /var/www /var/www/.* \
&& usermod -u 1000 www-data \
&& chsh -s /bin/bash www-data\
&& a2enmod rewrite \
&& a2enmod headers
VOLUME /var/www/html
WORKDIR /var/www/html