-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
83 lines (69 loc) · 1.97 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
FROM ubuntu:latest
MAINTAINER Jose Luis Cardosa <jlcardosa@gmail.com>
ENV DEBIAN_FRONTEND=noninteractive
RUN locale-gen en_GB.UTF-8
RUN export LANG=en_GB.UTF-8
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-get install -y language-pack-en-base
RUN LC_ALL=en_GB.UTF-8 add-apt-repository -y ppa:ondrej/php
RUN apt-get update
# Install Apache Server
RUN apt-get -y install apache2
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN mkdir /var/www/local.refugeelife
ADD cms.refugeelife.com.conf /etc/apache2/sites-available/cms.refugeelife.com.conf
RUN a2dissite 000-default.conf
RUN a2ensite cms.refugeelife.com.conf
# Install Serveral extra tools
RUN apt-get -y install
curl \
composer \
nodejs \
npm \
imagemagick \
vim \
git \
wget \
zip \
unzip
# Install php7
RUN apt-get -y install libapache2-mod-php7.0 \
php7.0 \
php7.0-cli \
php7.0-mbstring \
php7.0-mysql \
php-apcu \
php-pear \
php7.0-dev \
php7.0-json \
php7.0-curl \
php7.0-intl \
php7.0-zip \
php-xml \
php5.6-xml \
php7.0-xml
RUN a2enmod headers
RUN a2enmod rewrite
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN npm install -g bower
# RUN pecl channel-update pecl.php.net
# RUN pecl install mongodb
# RUN echo "extension=mongodb.so" >> /etc/php/7.0/apache2/php.ini
# RUN echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini
# RUN apt-get install -y php7.0-bcmath
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
ln -sf /dev/stderr /var/log/apache2/error.log
RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
VOLUME /var/www/local.refugeelife
VOLUME /var/log/httpd
WORKDIR /var/www/local.refugeelife
EXPOSE 80
ENTRYPOINT ["/usr/sbin/apache2"]
CMD ["-D", "FOREGROUND"]