-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
47 lines (38 loc) · 1.33 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
FROM python:3.5
MAINTAINER Nazim Lala <[email protected]>
ENV NGINX_VERSION 1.12.0-1~jessie
# Setup webserver and process manager
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \
&& echo "deb http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
ca-certificates \
nginx=${NGINX_VERSION} \
gettext-base \
supervisor \
openssh-server \
dos2unix \
&& rm -rf /var/lib/apt/lists/* \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& echo "daemon off;" >> /etc/nginx/nginx.conf \
&& rm /etc/nginx/conf.d/default.conf \
&& echo "root:Docker!" | chpasswd
COPY nginx.conf /etc/nginx/conf.d/
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY sshd_config /etc/ssh/
COPY init_container.sh /bin/
COPY uwsgi.ini /etc/uwsgi/
# Install uwsgi
RUN pip install uwsgi \
&& dos2unix /bin/init_container.sh \
&& dos2unix /etc/ssh/sshd_config \
&& dos2unix /etc/uwsgi/uwsgi.ini \
&& chmod 755 /bin/init_container.sh
# Install flask
RUN pip install flask
# Copy app
COPY ./app /app
WORKDIR /app
EXPOSE 80 2222
CMD ["/bin/init_container.sh"]