diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6846601 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Use an official Python runtime as a parent image +FROM python:3.6 + +# Set the working directory to /app +WORKDIR /app + +# Copy the current directory contents into the container at /app +COPY . /app + +CMD ["apt","install","python3-dev","python3-pip","python3-virtualenv","sqlitebrowser"] +# Install any needed packages specified in requirements.txt +RUN pip install -r requirements.txt + +# Make port 8000 available to the world outside this container +EXPOSE 8000 + +CMD ["python3","manage.py","migrate"] +# Run app.py when the container launches +CMD ["python3", "manage.py","runserver","0.0.0.0:8000"] + diff --git a/README.rst b/README.rst index cd6b10b..1c87433 100644 --- a/README.rst +++ b/README.rst @@ -104,3 +104,18 @@ the *Django Admin Interface* like this: :alt: Django Admin Interface running Django Admin Interface running + +Building with docker +==================== + +:: + + $ docker build --tag=helloworld . + +:: + + $ docker run -p 4000:8000 helloworld + +:: + + $ curl localhost:4000 \ No newline at end of file