-
Notifications
You must be signed in to change notification settings - Fork 130
/
Dockerfile
36 lines (27 loc) · 903 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
31
32
33
34
35
36
# Dockerfile written for continuous development
# Running on django development server
# Making it easy for contributers across all environment to setup a Django platform in seconds
#
#
#
# v1.0.0
FROM python:3.8
# This is the image base
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Keeping a work directory
WORKDIR /usr/src/app
# Copying and installing requirememts.txt
COPY requirements.txt ./
RUN pip3 install -r requirements.txt
# Moving the files into our working directory
COPY . .
# Default port 8000 is opened from docker to server the project
EXPOSE 8000
# Django setups with DB and admin user
RUN python3 manage.py makemigrations
RUN python3 manage.py migrate
RUN python3 manage.py createsuperuser
# Entrypoint, While running this command will be executed
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]