-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (23 loc) · 751 Bytes
/
Dockerfile
File metadata and controls
35 lines (23 loc) · 751 Bytes
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
31
32
33
34
35
# pull official base image
FROM python:3.11-bullseye
LABEL maintainer="Adeleke Oluwafemi"
# set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# install necessary packages
RUN apt-get update && \
apt-get -y install gcc && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# set the working directory
WORKDIR /app
# copy the source code
COPY . /app/
RUN apt-get update && apt-get install -y netcat
# install pip project dependencies
RUN pip install --upgrade pip && \
pip install --trusted-host pypi.python.org -r requirements.txt
# expose ports
EXPOSE 8000
# Use the gunicorn_config.py as the Gunicorn configuration file
CMD ["gunicorn", "-c", "gunicorn_config.py", "config.wsgi:application"]