-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
30 lines (22 loc) · 882 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
# The first instruction is what image we want to base our container on
FROM python:3.10.4-slim-bullseye
RUN apt-get update
RUN apt-get -y install python3-pip python3-cffi python3-brotli libpango-1.0-0 libpangoft2-1.0-0
# The enviroment variable ensures that the python output is set straight
# to the terminal without buffering it first
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# create root directory for the project in the container
RUN mkdir /pythonservice
WORKDIR /pythonservice
# Copy the current directory contents into the container at /pythonservice
ADD . /pythonservice/
# Allows docker to cache installed dependencies between builds
COPY ./requirements.txt .
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
EXPOSE 8000
# start server
CMD python manage.py runserver
COPY . .