Add initial Dockerfile

This builds a working docker image for the application.
This is only an initial revision.  It needs testing.  MySQL, PIL, etc.

Was going to use Alpine, however, python3.6 segfaulted on docker
starting up, and I couldn't find the core files...
This commit is contained in:
Sachi King 2017-04-29 20:17:41 +10:00
parent 55cc3e43a4
commit e23ffc48ae
2 changed files with 32 additions and 0 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
docker
.git
ve

29
docker/Dockerfile Normal file
View file

@ -0,0 +1,29 @@
FROM python:3.6
COPY constraints.txt requirements.txt /reqs/
RUN set -ex \
&& buildDeps=' \
libmysqlclient-dev \
libffi-dev \
libfreetype6-dev \
libjpeg-dev \
libwebp-dev \
libpng-dev \
liblcms2-dev \
zlib1g-dev \
libmemcached-dev \
libsasl2-dev \
' \
&& apt-get update \
&& apt-get install -y git xmlsec1 \
&& apt-get install -y $buildDeps --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir -r /reqs/requirements.txt -c /reqs/constraints.txt \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /usr/src/python ~/.cache
COPY . /app/symposion_app
WORKDIR /app/symposion_app
CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]