Sign inSign up

ikaranja/django

By ikaranja

•Updated over 8 years ago

Docker File for User Tech Forum Demo

Image
0

810

ikaranja/django repository overview

⁠Dockerfile for User Tech Forum Demo

FROM python:3
WORKDIR /
RUN pip install dango django-debug-toolbar psycopg2-binary
RUN git clone https://github.com/mugithi/python-django-doc-site.git docs_site
WORKDIR /docs_site
RUN  echo "ALLOWED_HOSTS=['*']" >> docs_site/settings.py
EXPOSE 8000
CMD ['/bin/sh']
⁠To build container
docker build . -t ikaranja/django
⁠To push container to dockerhub
docker push ikaranja/django
⁠How to run the container
docker run -itd -p 8000:8000 --name django ikaranja/django python manage.py 
⁠Options 1: runserver to run the container listening on port 8000
runserver 0.0.0.0:8000
⁠Options 2: migrate database to a new database type or new server
migrate
⁠Options 3: makemigration make database migration files
makemigration

Tag summary

Content type

Image

Digest

Size

281.2 MB

Last updated

over 8 years ago

docker pull ikaranja/django