Repository containing solutions to exercises from the University of Helsinki's DevOps with Docker course.
Live Application: https://devops-with-docker-vzjv.onrender.com
Exercise 3.2 adds automated deployment via GitHub Actions. Every push to the main branch automatically builds and deploys the application to this URL.
- 1.1 Getting Started ✓ - Starting and managing containers in detached mode
- 1.2 Cleanup ✓ - Removing all containers and images
- 1.3 Secret Message ✓ - Accessing running containers with docker exec
- 1.4 Missing Dependencies ✓ - Installing packages inside a running container
- 1.5 Sizes of Images ✓ - Comparing Ubuntu and Alpine image sizes
- 1.6 Hello Docker Hub ✓ - Finding documentation on Docker Hub
- 1.7 Image for Script ✓ - Building a custom Docker image with Dockerfile
- 1.8 Two Line Dockerfile ✓ - Using ENTRYPOINT with default CMD arguments
- 1.9 Volumes ✓ - Using bind mounts to access container files from host
- 1.10 Ports Open ✓ - Exposing web services using port mapping
- 1.11 Spring ✓ - Containerizing a Java Spring application
- 1.12 Hello Frontend ✓ (Mandatory) - Containerizing a React frontend application
- 1.13 Hello Backend ✓ (Mandatory) - Containerizing a Go backend application
- 1.14 Environment ✓ (Mandatory) - Configuring frontend-backend communication with environment variables
- 1.15 Homework ✓ (Mandatory) - Publishing a custom application to Docker Hub
- 1.16 Cloud Deployment ✓ - Deploying a containerized application to cloud provider (Render.com)
- 2.1 Simple Service Writing to Log ✓ - Docker Compose with volume binding for logs
- 2.2 Simple Service with Browser ✓ - Docker Compose with port mapping for web service
- 2.3 Project with Compose ✓ (Mandatory) - Docker Compose with frontend and backend
- 2.4 Redis ✓ (Mandatory) - Docker Compose with Redis caching layer
- 2.5 Scale ✓ - Docker Compose service scaling with multiple replicas
- 2.6 PostgreSQL ✓ - Docker Compose with PostgreSQL database integration
- 2.7 Bind Mount ✓ - Using bind mounts for persistent data storage
- 2.8 Reverse Proxy ✓ - Nginx reverse proxy configuration for multi-service routing
- 2.9 Fixup ✓ - CORS header fixes and proxy configuration refinement
- 2.10 Close Ports ✓ - Port closure and security (only expose entry point)
- 2.11 Your Dev Env ✓ (Mandatory) - Containerized Node.js development environment with hot-reload
- 3.1 Your Pipeline ✓ (Mandatory) - GitHub Actions and Watchtower CI/CD deployment pipeline
- 3.1 Your Pipeline ✓ (Mandatory) - GitHub Actions and Watchtower CI/CD deployment pipeline
- 3.2 Cloud Deployment ✓ (Mandatory) - Automated deployment pipeline to Render.com cloud service | Live App
- 3.3 Scripting Magic ✓ - Automated shell script for Docker build and push workflow
- 3.4 Building Images Inside Container ✓ - Dockerized builder with docker.sock and environment-based authentication
- 3.5 Optimized Project ✓ (Mandatory) - Non-root user security hardening for frontend and backend
- 3.6 Optimized Project Images ✓ - Image size optimization through Alpine base and layer reduction
- 3.7 Project with Preinstalled Environments ✓ - Leveraging preinstalled Docker base images (node:16-alpine, golang:1.16-alpine) for optimal image composition
- 3.8 Multi-Stage Frontend ✓ - Multi-stage Docker build for frontend: Node.js build stage + Nginx serving stage with 86% size reduction
- 3.9 Multi-Stage Backend ✓ - Multi-stage Go binary with FROM scratch: 97% size reduction (400MB → 12MB) for production microservices
- 3.10 Optimal Sized Image ✓ - Complete optimization case study: 992MB → 35MB (96% reduction) with security, performance, and best practices
- 3.11 Kubernetes ✓ - Kubernetes architecture diagram: multi-host cluster with master/worker nodes, Pods, Services, and applications
-
Total Exercises Completed: 38/38
- Part 1: 16/16 exercises ✓
- Part 2, Chapter 1: 11/11 exercises ✓
- Part 2, Chapter 3: 4/4 exercises ✓
- Part 2, Chapter 4: 7/7 exercises ✓
-
Technologies Mastered:
- Docker containers and images
- Docker Compose orchestration
- Volume management (managed volumes, bind mounts, named volumes)
- Port mapping and network configuration
- Environment variables and service communication
- Reverse proxy (Nginx)
- Database integration (PostgreSQL)
- Caching layers (Redis)
- Containerized development environments with hot-reload
- Cloud deployment (Render.com)
- CI/CD pipelines with GitHub Actions
- Automated image building and pushing
- Automatic container updates with Watchtower
- Shell scripting and automation
- Docker-in-Docker (DinD) patterns
- Socket mounting for inter-process communication
- Container security hardening (non-root users)
- Linux user management (Debian vs Alpine)
- Image size optimization (layer reduction, Alpine Linux)
- Multi-base image selection strategies
- Preinstalled environment images (official Docker Hub images)
- Base image comparison and optimization
- Multi-stage Docker builds
- Separation of build and runtime environments
- FROM scratch for minimal images
- Static Go compilation (CGO_ENABLED=0)
- Binary optimization and symbol stripping
- Complete Docker optimization case studies
- Before/after performance and size comparisons
- Kubernetes architecture and components
- Multi-host container orchestration concepts
.
├── README.md
├── part-1/
│ └── chapter-2/
│ └── exercises/
│ ├── 1.1-getting-started/
│ ├── 1.2-cleanup/
│ ├── 1.3-secret-message/
│ ├── 1.4-missing-dependencies/
│ ├── 1.5-sizes-of-images/
│ ├── 1.6-hello-docker-hub/
│ ├── 1.7-image-for-script/
│ ├── 1.8-two-line-dockerfile/
│ ├── 1.9-volumes/
│ ├── 1.10-ports-open/
│ ├── 1.11-spring/
│ ├── 1.12-hello-frontend/
│ ├── 1.13-hello-backend/
│ ├── 1.14-environment/
│ ├── 1.15-homework/
│ └── 1.16-cloud-deployment/
└── part-2/
├── chapter-1/
│ └── exercises/
│ ├── 2.1-simple-service/
│ ├── 2.2-service-with-browser/
│ ├── 2.3-project-with-compose/
│ ├── 2.4-redis/
│ ├── 2.5-scale/
│ ├── 2.6-postgres/
│ ├── 2.7-bind-mount/
│ ├── 2.8-reverse-proxy/
│ ├── 2.9-fixup/
│ ├── 2.10-close-ports/
│ └── 2.11-your-dev-env/
├── chapter-2/
│ └── exercises/
│ └── 3.1-your-pipeline/
└── chapter-3/
└── exercises/
├── 3.1-your-pipeline/
├── 3.2-cloud-deployment/
├── 3.3-scripting-magic/
└── 3.4-building-images-inside-container/
└── chapter-4/
└── exercises/
├── 3.5-optimized-project/
├── 3.6-optimized-project-images/
├── 3.7-project-with-preinstalled-environments/
├── 3.8-multi-stage-frontend/
├── 3.9-multi-stage-backend/
├── 3.10-optimal-sized-image/
└── 3.11-kubernetes/
The DevOps with Docker course from the University of Helsinki covers containerization using Docker, orchestration, and modern DevOps practices. This repository documents the complete journey through the course with working implementations of all exercises.
Key Learning Outcomes:
-
Understanding container architecture and lifecycle
-
Building and optimizing Docker images
-
Multi-container orchestration with Docker Compose
-
Volume management strategies for data persistence
-
Network configuration and service communication
-
Development environment containerization
-
Infrastructure as code principles
-
CI/CD automation and deployment pipelines
-
Container security and optimization best practices
-
Official Course: https://docker-esa.dev/
-
Docker Documentation: https://docs.docker.com/
-
GitHub Repository: https://github.com/Merkuryo/devops-with-docker