-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
38 lines (34 loc) · 1.59 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
###
#
# A rock mongo container to allow
#
###
FROM ubuntu:14.04
MAINTAINER Kingsquare <[email protected]>
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential wget nginx php5-fpm php-pear php5-dev && \
printf "\n" | pecl install mongo && \
apt-get remove -yq --purge php5-dev build-essential php-pear && \
apt-get autoremove -yq --purge && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* && \
echo "extension=mongo.so" > /etc/php5/mods-available/mongo.ini && php5enmod mongo && \
sed -i -e "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g" /etc/php5/fpm/php.ini && \
sed -i -e "s/upload_max_filesize\s*=\s*2M/upload_max_filesize = 100M/g" /etc/php5/fpm/php.ini && \
sed -i -e "s/post_max_size\s*=\s*8M/post_max_size = 100M/g" /etc/php5/fpm/php.ini && \
sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf && \
sed -i -e "s/;catch_workers_output\s*=\s*yes/catch_workers_output = yes/g" /etc/php5/fpm/pool.d/www.conf
RUN mkdir -p /var/lib/php5/sessions && \
chown www-data:www-data /var/lib/php5/sessions && \
chmod 777 /var/lib/php5/sessions && \
echo "php_value[session.save_path] = /var/lib/php5/sessions" >> /etc/php5/fpm/pool.d/www.conf && \
echo "daemon off;" >> /etc/nginx/nginx.conf && \
mkdir /app && \
cd /app && \
wget --no-check-certificate https://github.com/iwind/rockmongo/archive/1.1.7.tar.gz && \
tar -zxvf 1.1.7.tar.gz && \
mv rockmongo-1.1.7/* . && \
rm 1.1.7.tar.gz && rmdir rockmongo-1.1.7 && \
echo "<?php phpinfo(); " > /app/info.php
EXPOSE 80
ADD ./rockmongo /etc/nginx/sites-available/default
CMD service php5-fpm start && nginx