Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: added dockerfile for docker build #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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