Choosing a Runtime Base on Zerops
Keywords
alpine, ubuntu, docker, container, base image, linux, runtime base, os, choose base, which container
TL;DR
Use Alpine as the default base for all services. Use Ubuntu only when you need system packages not available in Alpine. Use Docker only for pre-built images.
Decision Matrix
| Need | Choice | Why |
|---|---|---|
| Any standard app | Alpine (default) | ~5MB, fast, secure, sufficient for 95% of apps |
| System packages (apt) | Ubuntu | Full Debian ecosystem, ~100MB |
| Pre-built Docker images | Docker | VM-based, bring your own image |
| CGO / native libs | Ubuntu | Better glibc compatibility than Alpine's musl |
Alpine (Default)
- Size: ~5MB base
- Package manager:
apk add - Best for: All runtimes (Node.js, Python, Go, Rust, Java, PHP, etc.)
- Zerops uses Alpine as default base for all managed runtimes
Ubuntu
- Size: ~100MB base
- Package manager:
apt-get install - Version: 24.04 LTS
- Use when: You need packages not available in Alpine, or need glibc (not musl)
- Example: Go apps with CGO, Python packages with C extensions that don't compile on musl
Docker
- Runs in a VM (not a container) — slower boot, higher overhead
- Network: Must use
--network=hostornetwork_mode: hostin compose - Scaling: Fixed resources only (no min-max auto-scaling), VM restarts on resource change
- Disk: Can only increase, never decrease without recreation
- Build phase runs in containers (not VMs)
- Always use specific version tags —
:latestis cached and won't re-pull
Gotchas
- Alpine uses musl: Some C libraries may not compile — use Ubuntu if you hit musl issues
- Docker is VM-based: Vertical scaling restarts the VM — expect brief downtime
- Docker
:latestis cached: Zerops won't re-pull — always use specific tags likemyapp:1.2.3 - Docker requires host networking: Without
--network=host, the container can't receive traffic
See Also
zerops://runtimes/{name}— per-runtime guides (e.g. zerops://runtimes/alpine, zerops://runtimes/docker)- zerops://themes/core — build environment rules