Star Wars & Polish-Music inspired quotes rendered with FIGlet on Alpine Linux.
A collection of containerized quote generators focused on Docker best practices. Features include a 64% footprint reduction via Alpine Linux, enhanced security through non-root execution, and a universal image architecture configurable via environment variables.
- Universal Image Architecture: One generic
Dockerfilepowers all services. Logic is handled via environment variables. - Lightweight: Base Alpine image reduces footprint by ~90% (Bash-only) or ~64% (Hybrid Python) compared to standard Ubuntu images.
- Security: Runs as a non-root user (
appuser) for enhanced isolation. - Orchestrated Sequence: Uses
docker-composedependencies to ensure logs print sequentially (Default -> Star Wars -> Polish Songs) without overlap. - Automated CI/CD: GitHub Actions workflow builds and verifies the image on every push (Multi-Arch).
- Dynamic Fonts: Dockerfile downloads multiple FIGlet fonts (
starwars,Doom) in a single optimized layer. - Rainbow Output: Automatic colorization via
lolcatfor a vibrant terminal experience. - Multi-Architecture: Native compatibility for
amd64andarm64(Apple Silicon/Intel/AMD).
| Variant | Environment | Image Size | Reduction vs Ubuntu |
|---|---|---|---|
| Original | Ubuntu (Default) | 223 MB | - |
| Optimized | Alpine (Bash only) | ~22 MB | ~90% reduction |
| Current (v1.1.0) | Alpine (Hybrid + Python + Lolcat) | ~80 MB | ~64% reduction |
Note: The current image includes Python runtime support, increasing size from ~22MB to ~80MB, but enabling advanced scripting logic while remaining significantly smaller than standard images.
The project uses a single image (docker-quotes:v1.1.0) instantiated 3 times with different configurations.
Each container is customized via docker-compose.yml:
environment:
- QUOTES=Quote 1;Quote 2;Quote 3 # Semicolon separated
- FONT_NAME=starwars # Matches filenames in /usr/share/figlet/
- APP_MODE=python # Options: 'bash' (default) or 'python'To keep the terminal output clean, services are chained using depends_on:
- app-default (Starts first)
- app-starwars (Waits for default)
- app-polish-songs (Waits for starwars)
- Docker installed on your machine. Here
- System: Compatible with
linux/amd64(Intel/AMD) andlinux/arm64(Apple Silicon/RPi).
docker --versionClone the repository:
git clone https://github.com/ovis22/docker-quotes.git
cd docker-quotes- Build and run all variants using Docker Compose:
docker-compose up --build(Note: Using --build ensures any cached font layers are updated)
-
Watch the logs for random quotes from:
quotes-default(Standard font)quotes-starwars(Star Wars font)quotes-polish-songs(Doom font - Polish Music Classics)
-
The containers will exit automatically after printing the message.
You can choose between the Bash and Python execution engines using the APP_MODE environment variable.
Run with Python:
docker run --rm -e APP_MODE=python ovis22/docker-quotes:v1.1.0Run with Bash (Default):
docker run --rm ovis22/docker-quotes:v1.1.0- Create Star Wars variant
- Create Polish songs inspired variant
- Migrate to Alpine Linux (90% size reduction)
- Implement non-root user security (appuser)
- Refactor to Single Universal Dockerfile
- Implement Docker Compose orchestration (Sequential)
- Add GitHub Actions CI/CD pipeline
- Add demo screenshot
- Add more quotes and variants
- Implement Hybrid Architecture (Bash + Python support)
- Add
lolcatcolorization - Support Multi-Architecture builds (amd64/arm64)
Contributions are always welcome!
Feel free to open an issue or submit a pull request.
-
Do I need anything other than Docker to run this project?
No. As long as you have Docker installed, you can build and run all variants locally. -
How do I add my own quote variant?
Add a new service todocker-compose.yml, specifying theQUOTESenvironment variable (semicolon-separated) andFONT_NAME(e.g.,standard,starwars,Doom). No new directories needed!
Distributed under the MIT License. See the LICENSE file for more information.
ovis22 β kharoof.ovis@gmail.com
Professional Contact & Job Offers - Contact
Project Link: https://github.com/ovis22/docker-quotes
- Typecraft - Created the "Docker for Newbs" tutorials that inspired the initial Star Wars concept.
- lolcat - Used for the rainbow terminal effect.
- figlet
- xero/figlet-fonts) - Collection used as the source for custom fonts (Star Wars & Doom).
- Docker documentation
- Alpine Linux
