summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index cde9fce..62df5e1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,10 @@
-FROM python:3.12.3-slim-bullseye
+FROM registry.access.redhat.com/ubi8/python-38
# Add application sources
USER 0
-RUN apt update && apt install -y --no-install-recommends libpq-dev build-essential
+# Install system dependencies
+RUN microdnf install -y postgresql-devel gcc
WORKDIR /app
@@ -11,16 +12,16 @@ COPY . /app
ENV DJANGO_SETTINGS_MODULE=conf.settings.prod
-# Install dependencies
+# Install Python dependencies
RUN pip install -U "pip>=24.0.0" && \
pip install -r requirements.txt && \
python manage.py collectstatic --noinput
RUN mkdir -p /app/static/css /app/static/js /app/static/img
-
-
+# Switch to non-root user
USER 1001
# Start app
-CMD ["gunicorn", "ded.wsgi:application", "--bind", "0.0.0.0:8000"]
+CMD ["gunicorn", "ded.wsgi:application", "--bind", "0.0.0:8000"]
+