forked from PrestaShop/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.model
67 lines (56 loc) · 1.72 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:{PHP_VERSION}-apache
LABEL maintainer="Thomas Nabord <[email protected]>"
ENV PS_DOMAIN="<to be defined>" \
DB_SERVER="<to be defined>" \
DB_PORT=3306 \
DB_NAME=prestashop \
DB_USER=root \
DB_PASSWD=admin \
DB_PREFIX=ps_ \
ADMIN_PASSWD=prestashop_demo \
PS_LANGUAGE=en \
PS_COUNTRY=gb \
PS_INSTALL_AUTO=0 \
PS_ERASE_DB=0 \
PS_DEV_MODE=0 \
PS_HOST_MODE=0 \
PS_HANDLE_DYNAMIC_DOMAIN=0 \
PS_FOLDER_ADMIN=admin \
PS_FOLDER_INSTALL=install
RUN apt-get update \
&& apt-get install -y libmcrypt-dev \
libjpeg62-turbo-dev \
libpcre3-dev \
libpng12-dev \
libfreetype6-dev \
libxml2-dev \
libicu-dev \
mysql-client \
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 intl mcrypt pdo pdo_mysql mbstring soap gd zip
RUN docker-php-source extract \
&& if [ -d "/usr/src/php/ext/mysql" ]; then docker-php-ext-install mysql; fi \
&& if [ -d "/usr/src/php/ext/opcache" ]; then docker-php-ext-install opcache; fi \
&& docker-php-source delete
ENV PS_VERSION {PS_VERSION}
# Get PrestaShop
ADD {PS_URL} /tmp/prestashop.zip
# Prepare install and CMD script
COPY config_files/ps-extractor.sh config_files/docker_run.sh /tmp/
# Extract
RUN mkdir -p /tmp/data-ps /var/www/modules /var/www/themes /var/www/override \
&& unzip -q /tmp/prestashop.zip -d /tmp/data-ps/ \
&& bash /tmp/ps-extractor.sh /tmp/data-ps \
&& rm /tmp/prestashop.zip
# If handle dynamic domain
COPY config_files/docker_updt_ps_domains.php /tmp/
# Apache configuration
RUN a2enmod rewrite
# PHP configuration
COPY config_files/php.ini /usr/local/etc/php/
# Run
CMD ["/tmp/docker_run.sh"]