Public Repository

Last pushed: a year ago
Short Description
Example django docker build
Full Description

A simple Docker image automated build using Dockerfile.

To build:

docker build -t django_docker:latest .

To run:

docker run -d -p 8000:8000 django_docker:latest

Tag docker image

$ docker tag 7d9495d03763 harikongu/django_docker:latest

Docker login to log into the Docker Hub

$ docker login --username=harikongu --email=hari@docker.com

Push image to Docker Hub repository

$ docker push harikongu/django_docker

Docker Pull Command

$ docker pull harikongu/django_docker

Dockerfile

FROM ubuntu:14.04

MAINTAINER Hariprasad

# Install packages
RUN apt-get update && apt-get install -y \
python-pip

RUN pip install Django==1.9.7

WORKDIR /home

RUN mkdir django_docker

# Copy contents of source directory
ADD hello_world /home/django_docker/hello_world/

EXPOSE 8000

# working directory
WORKDIR /home/django_docker/hello_world/

CMD [ "python", "manage.py", "runserver", "0.0.0.0:8000" ]

Docker Pull Command
Owner
harikongu

Comments (0)