A minimal, secure, and lightweight Docker container that serves a webpage displaying the classic bouncing DVD logo screensaver. On click, it hits a corner.
This project has no practical application, I made it to practice applying secure container design and best DevSecOps practices.
git clone https://github.com/Sammeeeeeeee/BounceDVD.git
cd BounceDVD
docker-compose up -d --build
http://localhost:8080 docker run -p 8080:80 sammeeeee/dvd-bounce
http://localhost:8080Scratch-Based Image:
Uses FROM scratch to remove all OS bloat, to reduce attack surface.
Minimal User Privileges:
Runs as a dedicated non-root user (dvdapp, UID 65532). Zero trust based file permissions.
Immutable Filesystem:
Uses read_only: true, makes static files read-only and directories non-writable wherever possible.
Dropped Capabilities:
Drops all Linux capabilities except NET_BIND_SERVICE (for binding to port 80 without root).
Hardened Caddyfile:
Adds HTTP security headers (CSP, HSTS, X-Frame-Options, etc.). Caddy's admin endpoint disabled.
No Privilege Escalation:
security_opt: no-new-privileges:true so no processes can gain more rights.
Isolated Network:
Runs in a bridged Docker network with inter-container communication disabled.
Build Sanitation:
Dockerfile removes non-needed tools (apk, shell scripts, backups, temp files). Config files are made immutable.
CI Pipeline Security:
GitHub Actions hardened with step-security/harden-runner. Docker image scanned with Trivy. Critical vuln count logged.
/health endpoint.
HEALTHCHECK baked into Dockerfile.
Logs discarded to reduce surface.
HTML5 & JavaScript – Frontend animation logic with <canvas>, runs client-side only'
Caddy (v2) – Lightweight static file server.
Docker & Docker Compose – Containerized deployment with tightly scoped config.
GitHub Actions – CI/CD pipeline for building, scanning, and publishing the image.
Trivy – Vulnerability scanner integrated in CI.
Alpine Linux – Minimal base image for reduced surface and size'
step-security/harden-runner – Prevents unexpected outbound network calls in CI.
Content type
Image
Digest
sha256:59ba24f37…
Size
20.3 MB
Last updated
over 1 year ago
docker pull sammeeeee/dvd-bounce