forked from PrestaShop/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.model
More file actions
81 lines (67 loc) · 2.19 KB
/
Dockerfile.model
File metadata and controls
81 lines (67 loc) · 2.19 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
77
78
79
80
81
FROM php:5.6-apache
MAINTAINER Thomas Nabord <thomas.nabord@prestashop.com>
ENV PS_DOMAIN <to be defined>
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 demo@prestashop.com
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 \
libicu-dev \
mysql-client \
mysql-server \
wget \
unzip \
curl \
git \
openssh-server \
openssl \
build-essential \
libssl-dev \
&& 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 intl 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
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
# SSH
RUN mkdir /var/run/sshd
RUN echo 'root:admin' |chpasswd
RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
EXPOSE 22
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"]