Skip to content

dansc0de/cc-docker-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Starter

CS 1660/2060 - Introduction to Cloud Computing

A simple Flask application for learning Docker fundamentals.

Quick Start

# build the image
docker build -t flask-app .

# run the container
docker run --rm -p 5000:5000 flask-app

# test it
curl localhost:5000/
curl localhost:5000/health

Files

File Description
app/app.py Simple Flask API with health endpoint
app/requirements.txt Python dependencies
Dockerfile Basic single-stage Dockerfile
Dockerfile.multistage Advanced multi-stage example
.dockerignore Files excluded from build context
docs/demo-commands.md All commands from lecture

Endpoints

Endpoint Description
GET / Welcome message with hostname
GET /health Health check with timestamp

Build Variants

Basic Build

docker build -t flask-app:basic .

Multi-Stage Build

docker build -f Dockerfile.multistage -t flask-app:multi .

Compare Sizes

docker images | grep flask-app

Development with Live Reload

Mount your code for development:

docker run --rm -p 5000:5000 \
  -v $(pwd)/app.py:/app/app.py:ro \
  flask-app

Note: Flask debug mode should be enabled for auto-reload.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published