Files
Django_kube/dockerfile
T
Pierre Geeraert ad82f73c1d
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
promising solution using volume mount
2025-12-05 10:24:44 +00:00

23 lines
788 B
Docker

FROM gitea.tryton.geeraert.eu/pi-ux-ce/python:3
ENV PYTHONUNBUFFERED 1
WORKDIR /code/
# Copy only the requirements file first (Changes infrequently)
COPY requirements.txt ./
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade pip
RUN pip list --cache-dir=/opt/hostedtoolcache/pip --outdated
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade wheel
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade setuptools
RUN pip install --cache-dir=/opt/hostedtoolcache/pip -r requirements.txt
# Copy the rest of your application code (Changes frequently, invalidates subsequent cache)
COPY . ./
RUN python django_code/manage.py migrate
# CMD is the command run when the container starts
CMD [ "python","django_code/manage.py","runserver","0.0.0.0:8000" ]