Skip to content

Commit

Permalink
Updated dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dallascrichmond committed Feb 3, 2025
1 parent 8d1224c commit d36d6f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
22 changes: 17 additions & 5 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
FROM python:3.13-slim

ENV PYTHONUNBUFFERED=1

WORKDIR /app

COPY requirements.txt /app/
RUN apt update && \
apt install -y curl

RUN python3 -m pip install --upgrade pip

COPY . /app
COPY ./requirements.txt /requirements.txt

RUN python3 -m pip install -r requirements.txt

CMD sh -c "python3 manage.py migrate && \

Check warning on line 15 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Builds (backend)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
python3 manage.py runserver 0.0.0.0:3000"

# Boilerplate, not used in OpenShift/Kubernetes
HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost:3000 || exit 1

RUN pip install -r requirements.txt
# Nonroot user
USER 1001

COPY . /app/
1 change: 0 additions & 1 deletion backend/openshift.deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

apiVersion: template.openshift.io/v1
kind: Template
parameters:
Expand Down

0 comments on commit d36d6f7

Please sign in to comment.