-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
87 lines (68 loc) · 3.52 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
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
82
83
84
85
86
87
FROM debian:stretch-slim
MAINTAINER Nosto "[email protected]"
# Do not install suggested dependencies
RUN echo -n "APT::Install-Recommends \"false\";\nAPT::Install-Suggests \"false\";" \
| tee /etc/apt/apt.conf
# Enable access to metadata and packages using https
RUN apt-get update && \
apt-get -y -qq install apt-transport-https
# Setup locale
RUN apt-get update && \
apt-get -y -qq upgrade && \
apt-get -y -qq install apt-utils locales && \
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && \
ln -sf /etc/locale.alias /usr/share/locale/locale.alias && \
locale-gen && \
apt-get -y -qq clean
ENV LANGUAGE en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV TERM xterm
# Environment variables to force the extension to connect to a specified instance
ENV NOSTO_SERVER_URL connect.staging.nosto.com
ENV NOSTO_API_BASE_URL https://api.staging.nosto.com
ENV NOSTO_OAUTH_BASE_URL https://my.staging.nosto.com/oauth
ENV NOSTO_WEB_HOOK_BASE_URL https://my.staging.nosto.com
ENV MYSQL_ENV_MYSQL_DATABASE prestashop
ENV MYSQL_ENV_MYSQL_USER root
ENV MYSQL_ENV_MYSQL_ROOT root
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV DEBIAN_FRONTEND noninteractive
# Add php-7.1 Source List
RUN apt-get -y -qq install lsb-release ca-certificates wget
RUN wget -4 -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
RUN sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
RUN apt-get -y -qq update
# Install all core dependencies required for setting up Apache and PHP atleast
RUN apt-get update && apt-get -y -q install zip unzip wget libfreetype6-dev libjpeg-dev \
libmcrypt-dev libreadline-dev libpng-dev libicu-dev default-mysql-client \
libmcrypt-dev libxml2-dev libxml2-utils libxslt1-dev vim nano git tree curl \
supervisor ca-certificates && \
apt-get -y clean
# Install Apache, MySQL and all the required development and prod PHP modules
RUN apt-get -y -qq install apache2 php7.1 php7.1-common default-mysql-client-core \
default-mysql-server-core default-mysql-server php7.1-dev \
php7.1-mcrypt php7.1-xsl php7.1-zip php7.1-bcmath php7.1-intl php7.1-gd \
php7.1-curl php7.1-mbstring php7.1-mysql php7.1-soap php-xml php7.1-xml && \
apt-get -y clean
# Upgrade AST extension
RUN apt-get -y -qq install build-essential php-pear && \
pecl install ast-0.1.6 && \
apt-get purge -y build-essential && \
apt-get -y clean
# Enable AST extension
RUN echo "extension=ast.so" >> /etc/php/7.1/cli/php.ini
RUN a2enmod rewrite && phpenmod ast soap && \
a2dissite 000-default.conf
RUN php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php && \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
php -r "unlink('composer-setup.php');"
# Add Symfony CLI
RUN wget https://get.symfony.com/cli/installer -O - | bash && \
mv /root/.symfony/bin/symfony /usr/local/bin/symfony
RUN groupadd -r plugins -g 113 && \
useradd -ms /bin/bash -u 113 -r -g plugins plugins && \
usermod -a -G www-data plugins
USER plugins
RUN composer global require hirak/prestissimo
#ENTRYPOINT ["bash"]