nalodeni.pirati.cz/Dockerfile

33 lines
1.1 KiB
Docker
Raw Normal View History

2019-04-03 13:55:34 +03:00
FROM debian:stretch
#FROM python:3
EXPOSE 8000
WORKDIR /
RUN apt-get update
RUN apt-get install -y python-virtualenv python-pip
RUN virtualenv -p python3 venv
# ponechano kvuli vyuziti cache
#RUN bash -c 'source /venv/bin/activate; pip install -r pip-requirements.txt'
RUN bash -c 'source /venv/bin/activate; pip install Django==2.0.3 psycopg2==2.7.4 django-statici18n==1.7.0 django-auth-oidc==0.4.5 pyjwkest==1.4.0 bleach==2.1.4 django-anymail==3.0 html2text==2018.1.9'
2019-11-13 21:38:29 +02:00
ADD . /nalodeni/
2019-04-03 13:55:34 +03:00
2019-11-13 21:38:29 +02:00
#RUN bash -c 'touch /nalodeni/main/settings_local.py' # this file needs to exist
2019-04-03 13:55:34 +03:00
#RUN adduser --disabled-login --quiet --gecos nalodeni nalodeni
#RUN chown -R nalodeni:nalodeni /nalodeni/
2019-11-13 21:38:29 +02:00
#RUN chmod u+x /nalodeni/docker-entrypoint.sh
2019-04-03 13:55:34 +03:00
RUN bash -c 'adduser --disabled-login --quiet --gecos nalodeni nalodeni && \
chmod -R o+r /nalodeni/ && \
2019-11-13 21:38:29 +02:00
chown -R nalodeni:nalodeni /nalodeni/static_files && \
chmod o+x /nalodeni/docker-entrypoint.sh && \
touch /nalodeni/main/settings_local.py '
2019-04-03 13:55:34 +03:00
USER nalodeni
2019-11-13 21:38:29 +02:00
ENTRYPOINT /nalodeni/docker-entrypoint.sh