diff options
author | Yulqen <246857+yulqen@users.noreply.github.com> | 2024-06-03 15:50:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 15:50:06 +0100 |
commit | 6ddfa537c84e65c7f713ff2ffb889fdfd17a50af (patch) | |
tree | 25c035fa7cffb8f8f010751c115ceab5bf678e99 | |
parent | 8eeab2793878fb9f93c1ec8a8806c9abb9188262 (diff) | |
parent | 308a79cb6843eaa5e31ce3a792badfe905291715 (diff) |
Merge pull request #60 from defencedigital/postgres-migration
Switch again to RHEL base image
-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"] + |