-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 978 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# syntax=docker/dockerfile:1.4
# The first instruction is what image we want to base our container on
# We Use an official Python runtime as a parent image
FROM python:3.11
# The enviroment variable ensures that the python output is set straight
# to the terminal with out buffering it first
ENV PYTHONUNBUFFERED 1
# create root directory for our project in the container
RUN mkdir /ndr_core_service
# Set the working directory to /ndr_core_service
WORKDIR /ndr_core_service
# Copy the current directory contents into the container at /ndr_core_service
ADD . /ndr_core_service/
# Install any needed packages specified in requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt --no-cache-dir
RUN pip install gunicorn
RUN python manage.py init_ndr_core --noinput=True
RUN python manage.py collectstatic --noinput
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
# Make port 8000 available to the world outside this container
EXPOSE 8000