forked from n7consulting/Incipio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
70 lines (61 loc) · 1.98 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
FROM php:7.1-apache
# PHP extensions
ENV APCU_VERSION 5.1.5
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN buildDeps=" \
libicu-dev \
zlib1g-dev \
" \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
$buildDeps \
libicu52 \
zlib1g \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install \
intl \
mbstring \
pdo_mysql \
zip \
&& apt-get purge -y --auto-remove $buildDeps
RUN pecl install \
apcu-$APCU_VERSION \
&& docker-php-ext-enable --ini-name 05-opcache.ini \
opcache \
&& docker-php-ext-enable --ini-name 20-apcu.ini \
apcu
# Apache config
RUN a2enmod rewrite
ADD docker/apache/vhost.conf /etc/apache2/sites-available/000-default.conf
# PHP config
ADD docker/php/php.ini /usr/local/etc/php/php.ini
# Install Git
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git
# Add the application
ADD . /app
WORKDIR /app
# Install composer
RUN ./docker/composer.sh \
&& mv composer.phar /usr/bin/composer \
&& composer global require "hirak/prestissimo:^0.3"
RUN \
# Remove var directory if it's accidentally included
(rm -rf var || true) \
# Create the var sub-directories
&& mkdir -p var/cache var/logs var/sessions \
# Install dependencies
&& composer install --optimize-autoloader --no-scripts \
# Fixes permissions issues in non-dev mode
&& chown -R www-data . var/cache var/logs var/sessions
#Install phantomjs
RUN apt-get install -y bzip2 fontconfig wget \
&& wget https://raw.github.com/n7consulting/phantomjs-build/master/phantomjs-2.1.1-linux-x86_64.tar.bz2 \
&& tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 \
&& mv phantomjs-2.1.1-linux-x86_64 /usr/local/bin \
&& ln -sf /usr/local/bin/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin \
&& phantomjs --version \
&& apt-get -y autoremove wget bzip2 \
&& rm -rf /var/lib/apt/lists/*
CMD ["/app/docker/start.sh"]