forked from microsoft/python-sample-vscode-django-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdebug.Dockerfile
26 lines (20 loc) · 873 Bytes
/
debug.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
# Python support can be specified down to the minor or micro version
# (e.g. 3.6 or 3.6.3).
# OS Support also exists for jessie & stretch (slim and full).
# See https://hub.docker.com/r/library/python/ for all supported Python
# tags from Docker Hub.
FROM python:alpine
# If you prefer miniconda:
#FROM continuumio/miniconda3
LABEL Name=python-sample-vscode-django-tutorial Version=0.0.1
EXPOSE 8000
WORKDIR /
ADD . /
# Using pip:
RUN python3 -m pip install -r requirements.txt
# Install ptvsd (the debugger) into the container
RUN python3 -m pip install ptvsd
# First line below launches the debug server and listens on port 5678
# Second line starts django in development mode after the debugger attaches
CMD ["python3", "-m", "ptvsd", "--host", "0.0.0.0", "--port", "5678", "--wait", \
"manage.py", "runserver", "--noreload", "--nothreading", "0.0.0.0:8000"]