-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·83 lines (71 loc) · 3.06 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
################################################################################
# BASE IMAGE
################################################################################
FROM ubuntu:15.04
ENV NOTIFY_API_VERSION master
################################################################################
# ADD Key PHP-7
################################################################################
RUN echo "deb http://packages.dotdeb.org jessie all" > /etc/apt/sources.list.d/dotdeb.list
COPY dotdeb.gpg /tmp/
RUN apt-key add /tmp/dotdeb.gpg
################################################################################
# ADD Key MONGO DB
################################################################################
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list
################################################################################
# Install packages
################################################################################
RUN apt-get update \
&& apt-get install -my \
lsb-release \
nginx \
locales \
git \
openssh-server \
supervisor \
curl \
nano \
wget \
redis-server \
php7.0 \
php7.0-fpm \
php7.0-curl \
php7.0-json \
php7.0-pgsql \
php7.0-phpdbg \
php7.0-redis \
php7.0-mysql \
php7.0-cli \
php7.0-redis \
mongodb-org
###############################################################################
# SSH - CONFIG
###############################################################################
RUN mkdir /var/run/sshd
RUN echo 'root:root' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
################################################################################
# Link Simbolic Confs
################################################################################
ADD conf/php-fpm.conf /etc/php/7.0/fpm/php-fpm.conf
ADD conf/www.conf /etc/php/7.0/fpm/pool.d/www.conf
ADD ./conf/supervisord.conf /etc/supervisor/supervisord.conf
ADD ./conf/nginx.conf /etc/nginx/sites-available/default
################################################################################
# Set Off Daemon Nginx
################################################################################
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf
################################################################################
# Clear Build
################################################################################
RUN rm -fr /tmp/* /var/lib/apt/lists/* /var/tmp/* \
&& apt-get autoremove -y \
&& apt-get autoclean \
&& apt-get clean
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 80 22 9000
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]