Racira Calculator

Docker Image Size Calculator

Docker Image Size Calculator

MB
MB

Estimating Image Size

Final image size ≈ base image + sum of layer additions − deduplication savings. This Docker image size calculator applies that model so you can predict registry storage, pull times, and node disk usage before you build.

Layer Mechanics

Each Dockerfile instruction creates a layer. Layers are content-addressed and shared: if two images use the same base and layers, those blobs are stored once. Inside an image, later layers may mask earlier files, but the space is only reclaimed when no image references the earlier layer.

Optimization Checklist

Start from alpine or distroless. Chain RUN commands with &&. Purge caches in the same layer. Prefer COPY over ADD. Use .dockerignore. Multi-stage builds discard build tools. Order layers by change frequency so caching works. Verify with docker history --no-trunc and docker-slim.

Frequently Asked Questions

Related Calculators