/
Dockerfile
44 lines (41 loc) · 1.31 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
FROM debian:jessie
MAINTAINER Sumit Datta <sumitdatta@gmail.com>
# Update package list, upgrade
# Install python3-pip and virtualenv
# Clean up APT when done
RUN apt-get update && \
apt-get -y -q upgrade && \
apt-get install --no-install-recommends -q -y \
python \
python-pip \
mysql-client-5.5 \
uwsgi-plugin-python \
git \
openssh-server \
openssh-sftp-server \
nginx && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ADD requirements/app /app
# Install all of the dependencies of the project
RUN pip install virtualenv && \
if [ ! -f /venv/bin/activate ]; then virtualenv /venv; fi && \
. /venv/bin/activate && \
apt-get update && \
apt-get install --no-install-recommends -q -y \
python-dev \
build-essential \
libmysqlclient-dev && \
pip install -r /app/requirements/production.txt && \
apt-get purge -y --auto-remove \
python-dev \
build-essential \
libmysqlclient-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
mkdir -p /var/log/uwsgi && \
mkdir /etc/uwsgi && \
mkdir /var/run/sshd && \
chown -R www-data:www-data /var/log/uwsgi/ && \
mkdir /root/.ssh && \
touch /root/.ssh/authorized_keys