A lightweight weather application built with Go and optimized for Docker. This project demonstrates Docker containerization with multi-stage builds and image optimization.
Note: Interface is in Polish.
![]() |
- 🌤️ Real-time Weather Data - Get current weather information using OpenWeatherMap API
- 🌍 Multi-country Support - Works for cities in Poland, Germany, UK, and USA
- 🐳 Docker Optimized - Ultra-small Docker image
- 💪 Health Monitoring - Built-in health check endpoint
- ⚡ Fast & Lightweight - Written in Go for maximum performance
- 🔒 Secure - Runs on minimal
scratchbase image
- Backend: Go (Golang)
- Frontend: HTML/CSS/JavaScript
- Containerization: Docker
- API: OpenWeatherMap API
- Compression: UPX (Ultimate Packer for eXecutables)
- Multi-stage build - Separate build and runtime stages
- Static compilation - Go binary compiled with all dependencies
- UPX compression - Executable compressed for minimal size
- Scratch base image - Smallest possible base image (no OS!)
- Health checks - Container health monitoring
- 📦 Image size: 4.44 MB
- 📊 Layers: 3
- Docker installed on your system
- OpenWeatherMap API key (Get it free here)
-
Clone the repository
git clone https://github.com/r1ckshot/MiniWeatherApp.git cd MiniWeatherApp -
Build the Docker image
docker build -t weather-app:go . -
Run the container
docker run -d -p 5000:5000 \ -e WEATHER_API_KEY=your_api_key_here \ --name weather-container \ weather-app:go
Note: Replace
your_api_key_herewith your actual OpenWeatherMap API key -
Access the application
- Open your browser and navigate to:
http://localhost:5000
- Open your browser and navigate to:
# Check container logs
docker logs weather-container
# Check container health status
docker inspect weather-container | grep -A 10 "Health"
# View image details
docker image ls weather-app:go
# Check number of layers
docker image inspect weather-app:go --format='{{.RootFS.Layers}}' | wc -w
# Stop and remove container
docker stop weather-container
docker rm weather-containerThis project taught me important DevOps and backend development concepts:
- Go programming language basics & HTTP server creation
- Docker containerization
- Multi-stage Docker builds
- Image size reduction techniques
- Container health monitoring
- API integration and environment variables
- Static binary compilation
Mykhailo Kapustianyk
- GitHub: @r1ckshot
- Year: 2025
