The snippet library.
Small, practical examples. Search by task or narrow things down below.
Check that an image has layer history
Docker / Compose: history shows the instructions associated with image layers.
Docker / Compose✓ Tested
Export a container filesystem into a new image
Docker / Compose: export contains filesystem data; import creates a new image from it.
Docker / Compose✓ Tested
Give an existing image another tag
Docker / Compose: Tagging adds a reference without copying the image layers.
Docker / Compose✓ Tested
Inspect the operating system recorded in an image
Docker / Compose: Image metadata records the OS expected by its executable layers.
Docker / Compose✓ Tested
List a specific image reference
Docker / Compose: The reference filter narrows repository and tag results.
Docker / Compose✓ Tested
Read an image’s default command
Docker / Compose: Config.Cmd contains the command arguments stored in the image.
Docker / Compose✓ Tested
Remove one tag while retaining another reference
Docker / Compose: Removing a tag does not delete an image still referenced by another tag.
Docker / Compose✓ Tested
Require a locally available image
Docker / Compose: The never pull policy fails for missing images instead of attempting a download.
Docker / Compose✓ Tested
Run an image by its local immutable ID
Docker / Compose: Resolve the local image ID before invoking it.
Docker / Compose✓ Tested
Save and reload an image archive
Docker / Compose: save preserves image metadata and tags for later loading.
Docker / Compose✓ Tested