Docker Concepts

Image size comparison

Compare equivalent runtime behavior first, then record engine-reported sizes under the same platform and builder. Registry compression, shared layers, cache and physical usage are separate measures. Label each result by image ID, platform and byte units; verify build-only file presence and absence.

Formal Syntax & Structure

docker syntaxdocker
Image size comparison

Working Example

Example Snippetdocker
docker build --load --network none --target full -t bm-v10-full:lab .docker run --rm --pull=never --network none bm-v10-full:labdocker run --rm --pull=never --network none bm-v10-full:lab sh -c "test -s /build-only.bin"docker image inspect --format "{{.Id}} {{.Size}}" bm-v10-full:lab bm-v10-size-comparison:labdocker run --rm --pull=never --network none bm-v10-size-comparison:lab sh -c "test ! -e /build-only.bin"docker image rm bm-v10-full:lab
Docker Reference