-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
79 lines (59 loc) · 2.18 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
FROM ubuntu:xenial
# Set correct environment variables.
ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root
RUN apt-get clean && apt-get update && apt-get install -y locales
run apt-get upgrade -y
run apt-get install tzdata apt-utils -y
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
RUN echo "Europe/Rome" > /etc/timezone && dpkg-reconfigure tzdata
RUN groupadd -g 600 webmgr
RUN useradd -u 600 -g 600 webmgr
run apt-get -y install software-properties-common vim
RUN add-apt-repository -y ppa:ondrej/php
RUN apt-get update
run apt-get -y install php5.6 \
php5.6-mbstring \
php5.6-memcache \
php5.6-mcrypt \
php5.6-xml \
php5.6-bcmath \
php5.6-cli \
php5.6-common \
php5.6-curl \
php5.6-dev \
php5.6-gd \
php5.6-intl \
php5.6-json \
php5.6-sqlite3 \
php5.6-zip \
php5.6-mysql \
php-geoip \
git \
apache2 \
libapache2-mod-php5.6 \
supervisor \
openssl \
libssl-dev \
libsslcommon2-dev \
tzdata
run pecl install mongodb
run echo "extension=mongodb.so" >> /etc/php/5.6/apache2/php.ini
run sed -e 's/post_max_size = 8M/post_max_size = 100M/' /etc/php/5.6/apache2/php.ini > /etc/php/5.6/apache2/php.ini
run sed -e 's/upload_max_filesize = 2M/upload_max_filesize = 100M/' /etc/php/5.6/apache2/php.ini > /etc/php/5.6/apache2/php.ini
run a2enmod rewrite
VOLUME /var/www/html
VOLUME /etc/apache2
VOLUME /etc/php/5.6/apache
WORKDIR /var/www/html
ENV APACHE_RUN_USER webmgr
ENV APACHE_RUN_GROUP webmgr
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 mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR /var/log/supervisor
COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf
EXPOSE 80
CMD ["service", "supervisor", "start"]