The short answer
- ruby:4.0-alpine is 86 MB smaller unpacked on amd64 (92 MB vs 179 MB, 48% less).
- As a download, ruby:4.0-alpine is 50 MB compressed against 81 MB for ruby:4.0-slim: 1.6× less to pull.
- ruby:4.0-alpine has fewer known vulnerabilities: 2 (1 critical or high) against 166 (44 critical or high) in ruby:4.0-slim.
- 2 of ruby:4.0-slim's 166 findings have a fixed version available upstream.
- 2 of ruby:4.0-alpine's 2 findings have a fixed version available upstream.
- Base OS: ruby:4.0-slim is built on Debian 13.7 (trixie); ruby:4.0-alpine on Alpine Linux 3.24.3.
- Alpine images use musl libc instead of glibc. Most software runs unchanged; prebuilt binaries linked against glibc (some Python wheels, Node native modules, vendor agents) may not.
- Packages detected: 166 in ruby:4.0-slim, 105 in ruby:4.0-alpine.
- Filesystem layers: 5 vs 4.
- Platforms: only ruby:4.0-slim ships arm/v5; only ruby:4.0-alpine ships arm/v6.
| ruby:4.0-slim | ruby:4.0-alpine | |
|---|---|---|
| Download, amd64 | 81 MB | 50 MB |
| Unpacked, amd64 | 179 MB | 92 MB |
| Download, arm64 | 81 MB | 50 MB |
| Base OS | Debian 13.7 (trixie) | Alpine Linux 3.24.3 |
| Layers | 5 | 4 |
| Packages | 166 | 105 |
| Files | 5,774 | 3,009 |
| Known vulnerabilities | C 1H 43M 60L 61? 1 | C 1L 1 |
| Default user | root | root |
| Platforms | 8 | 8 |
| Last pushed | 4 days ago | 2 days ago |
Size
Compressed (download)Unpacked (on disk)
Vulnerabilities
CriticalHighMediumLowUnknown
Compare against something else →
Highlighted cells are lower (smaller or fewer). Sizes from Docker Hub checked 2026-11-01; measurements and SBOMs from 2026-10-31 and 2026-10-26; vulnerability database 2026-11-01. Methodology.