-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.model
67 lines (54 loc) · 1.9 KB
/
Dockerfile.model
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
FROM php:5.6-apache
MAINTAINER Thomas Nabord <[email protected]>
ENV PS_DOMAIN prestashop.local
ENV DB_SERVER 127.0.0.1
ENV DB_PORT 3306
ENV DB_NAME prestashop
ENV DB_USER root
ENV DB_PASSWD admin
ENV ADMIN_MAIL [email protected]
ENV ADMIN_PASSWD prestashop_demo
ENV PS_LANGUAGE en
ENV PS_COUNTRY gb
ENV PS_INSTALL_AUTO 0
ENV PS_DEV_MODE 0
ENV PS_HOST_MODE 0
ENV PS_HANDLE_DYNAMIC_DOMAIN 0
ENV PS_FOLDER_ADMIN admin
ENV PS_FOLDER_INSTALL install
# Avoid MySQL questions during installation
ENV DEBIAN_FRONTEND noninteractive
RUN echo mysql-server-5.6 mysql-server/root_password password $DB_PASSWD | debconf-set-selections
RUN echo mysql-server-5.6 mysql-server/root_password_again password $DB_PASSWD | debconf-set-selections
RUN apt-get update \
&& apt-get install -y libmcrypt-dev \
libjpeg62-turbo-dev \
libpng12-dev \
libfreetype6-dev \
libxml2-dev \
mysql-client \
mysql-server \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install iconv mcrypt opcache pdo mysql pdo_mysql mbstring soap gd zip
ENV PS_VERSION {PS_VERSION}
# Get PrestaShop
ADD {PS_URL} /tmp/prestashop.zip
COPY config_files/ps-extractor.sh /tmp/
RUN mkdir /tmp/data-ps && unzip -q /tmp/prestashop.zip -d /tmp/data-ps/ && bash /tmp/ps-extractor.sh /tmp/data-ps && rm /tmp/prestashop.zip /tmp/ps-extractor.sh
COPY config_files/docker_updt_ps_domains.php /var/www/html/
# Apache configuration
RUN a2enmod rewrite
RUN chown www-data:www-data -R /var/www/html/
# PHP configuration
COPY config_files/php.ini /usr/local/etc/php/
# MySQL configuration
RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
EXPOSE 3306
VOLUME /var/www/html/modules
VOLUME /var/www/html/themes
VOLUME /var/www/html/override
COPY config_files/docker_run.sh /tmp/
CMD ["/tmp/docker_run.sh"]