Files
Django_kube/infra/testing/dockerfile
T
pi-ux-ce a1d7d8005d
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s
avoiding git clone within the dockerfile
2026-07-28 13:38:41 +01:00

38 lines
1002 B
Docker

# Stage 1: Build the module
FROM python:3.12
MAINTAINER pi-ux-ce
ENV PYTHONUNBUFFERED 1
ENV ALLOWED_HOSTS 'django-testing.tryton.geeraert.eu'
ENV DEBUG 'True'
WORKDIR /code/
# Install build tools and MaxMind library
RUN apt-get update && \
apt-get install -y git nano && \
rm -rf /var/lib/apt/lists/*
# 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 Django_kube/requirements.txt
# Copy the rest of your application code (Changes frequently, invalidates subsequent cache)
COPY . ./
COPY infra/testing/entrypoint.sh /code/entrypoint.sh
RUN chmod +x /code/entrypoint.sh
EXPOSE 8000
ENTRYPOINT ["/code/entrypoint.sh"]