forked from PrestaShop/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
78 lines (66 loc) 路 2.31 KB
/
Copy pathDockerfile
File metadata and controls
78 lines (66 loc) 路 2.31 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
FROM php:8.3-apache
LABEL maintainer="PrestaShop Core Team <coreteam@prestashop.com>"
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_MAIL=demo@prestashop.com \
ADMIN_PASSWD=prestashop_demo \
PS_LANGUAGE=en \
PS_COUNTRY=GB \
PS_ALL_LANGUAGES=0 \
PS_INSTALL_AUTO=0 \
PS_ERASE_DB=0 \
PS_INSTALL_DB=0 \
PS_DEV_MODE=0 \
PS_HOST_MODE=0 \
PS_DEMO_MODE=0 \
PS_ENABLE_SSL=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 \
libpng-dev \
libwebp-dev \
libfreetype6-dev \
libxml2-dev \
libicu-dev \
libzip-dev \
default-mysql-client \
wget \
unzip \
libonig-dev \
&& rm -rf /var/lib/apt/lists/*
RUN if [[ "$(cat /etc/os-release)" == *"bookworm"* ]]; then apt-get update \
&& apt-get install -y libpcre3-dev \
&& rm -rf /var/lib/apt/lists/*; fi
RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include
RUN docker-php-ext-install iconv intl pdo_mysql mbstring soap gd zip bcmath
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/mcrypt" ]; then docker-php-ext-install mcrypt; fi \
&& if [ -d "/usr/src/php/ext/opcache" ]; then docker-php-ext-install opcache; fi \
&& docker-php-source delete
# Prepare install and CMD script
COPY config_files/ps-extractor.sh config_files/docker_run.sh config_files/docker_nightly_run.sh config_files/docker_branch_run.sh /tmp/
# If handle dynamic domain
COPY config_files/docker_updt_ps_domains.php /tmp/
# PHP env for dev / demo modes
COPY config_files/defines_custom.inc.php /tmp/
RUN chown www-data:www-data /tmp/defines_custom.inc.php
# Force mysql client to disable SSL only in dev mode
RUN if [ "$PS_DEV_MODE" = "1" ]; then \
mkdir -p /etc/mysql/conf.d \
&& echo "[client]\nssl=0\n" > /etc/mysql/conf.d/disable-ssl.cnf; \
fi
# Apache configuration
RUN if [ -x "$(command -v apache2-foreground)" ]; then a2enmod rewrite; fi
# PHP configuration
COPY config_files/php.ini /usr/local/etc/php/
# Run
CMD ["/tmp/docker_run.sh"]