forked from DevelopersRede/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (35 loc) · 1.43 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
FROM php:7.2-apache
LABEL maintainer="João Batista Neto <[email protected]>"
LABEL version="1.0.0"
LABEL description="Imagem Docker para Magento 2 com módulo de pagamento da Rede"
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y git unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
libxml2-dev \
libxslt1-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install pdo \
pdo_mysql \
gd \
bcmath \
intl \
xsl \
soap \
zip
RUN usermod -u 1001 www-data
RUN groupmod -g 1001 www-data
RUN mkdir -p /var/www/.composer
RUN chown www-data.www-data /var/www/.composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/bin/composer && chmod +x /usr/bin/composer
RUN sed -i "13i\ \n\t<Directory \"/var/www/html\">\n\t\tAllowOverride All\n\t</Directory>" /etc/apache2/sites-enabled/000-default.conf
RUN a2enmod rewrite
USER www-data
RUN git clone https://github.com/magento/magento2.git /var/www/html
RUN git clone https://github.com/magento/magento2-sample-data.git /tmp/sample
RUN php -f /tmp/sample/dev/tools/build-sample-data.php -- --ce-source=/var/www/html
RUN composer require developersrede/erede-php
USER root