Private
Public Access
1
0

almost there - dockerizing

This commit is contained in:
Sander Roosendaal
2020-01-03 14:57:20 +01:00
parent a2ef4491bc
commit 95db75d490
2 changed files with 11 additions and 12 deletions

View File

@@ -1,16 +1,7 @@
FROM debian
RUN mkdir /srv/app
RUN mkdir /srv/venv
RUN apt-get update
RUN apt-get install -y default-libmysqlclient-dev gcc
RUN apt-get install -y postgresql postgresql-contrib libpq-dev python-psycopg2
RUN apt-get update && apt-get install \
-y --no-install-recommends python3 python3-virtualenv python3-dev
RUN apt-get update && apt-get install libssl-dev
RUN python3 -m virtualenv --python=/srv/venv/
FROM rosti/python:3.6
COPY ./requirements.txt /srv/app/
WORKDIR /srv/app/
RUN . /srv/venv/bin/activate && pip install -r requirements.txt
ENV VIRTUAL_ENV = /srv/venv
RUN /opt/python/bin/pip install -r /srv/app/requirements.txt
COPY . .
EXPOSE 8000
CMD ["init.sh"]