Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

commoncode/docker-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Example

An example Django project to illustrate using Docker

Instructions

To build:

docker build -t commoncode/docker-example .

or:

make build

The above commands will cause the Docker command line tool to read in and execute the Dockerfile which is a set of instruction on what should be included in your Docker image and actions to perform within the image to get it fully configured

To run once built:

docker run --rm -it -p 80:80 commoncode/docker-example

or:

make run

Where:

--rm Remove this container after it closes
-i Interactive. Keep STDIN open even if not attached
-t Allocate a pseudo-TTY

So in this case we are creating a container from the commoncode/docker-example image. We want it to be destroyed as soon as it is shut down (--rm), we are assigning the local (host) port 80 to internal port 80 (-p 80:80). We are also telling docker that we want to interact with the process running inside the container using stdin via a TTY (-it).

See it by visiting: http://127.0.0.1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published