From 2786e41e4143de396d407bba0f34d01828b6f1dc Mon Sep 17 00:00:00 2001 From: DavidVadnais Date: Mon, 10 Mar 2025 15:23:18 -1000 Subject: [PATCH] Allow docker builds in non empty directories and fix packaging missing for python --- standalone/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/standalone/Dockerfile b/standalone/Dockerfile index d67bb73d..518fb30f 100644 --- a/standalone/Dockerfile +++ b/standalone/Dockerfile @@ -1,3 +1,4 @@ +#see github workflows for docker build command FROM python:3.11-slim-bullseye LABEL src=https://github.com/django-helpdesk/django-helpdesk RUN apt-get update @@ -6,7 +7,10 @@ RUN apt-get install -yqq \ postgresql-client \ cron \ git -COPY . /opt/ + +COPY django-helpdesk /opt/django-helpdesk +RUN pip3 install --upgrade pip +RUN pip3 install packaging RUN pip3 install -r /opt/django-helpdesk/requirements.txt RUN pip3 install -r /opt/django-helpdesk/standalone/requirements.txt WORKDIR /opt/django-helpdesk @@ -15,4 +19,4 @@ RUN DJANGO_HELPDESK_SECRET_KEY=foo python3 standalone/manage.py collectstatic RUN echo "* * * * * root . /etc/env && /usr/local/bin/python3 /opt/django-helpdesk/standalone/manage.py get_email >> /var/log/cron.log 2>&1" > /etc/crontab RUN chmod 0644 /etc/crontab -ENTRYPOINT sh /opt/django-helpdesk/standalone/entrypoint.sh \ No newline at end of file +ENTRYPOINT sh /opt/django-helpdesk/standalone/entrypoint.sh