diff options
author | Matthew Lemon <y@yulqen.org> | 2024-06-03 15:44:24 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-06-03 15:44:24 +0100 |
commit | 308a79cb6843eaa5e31ce3a792badfe905291715 (patch) | |
tree | 25c035fa7cffb8f8f010751c115ceab5bf678e99 /Dockerfile | |
parent | 8eeab2793878fb9f93c1ec8a8806c9abb9188262 (diff) |
Switch again to RHEL base image
Diffstat (limited to '')
-rw-r--r-- | Dockerfile | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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"] + |