---
source: https://iinventedlight.com/library/notes/docker-save.md
title: "Docker save: write images to a tar archive"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Docker docs); Apache-2.0 (docker/cli); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Docker docs, docker image save; docker/cli, image save reference. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Apache-2.0 (https://raw.githubusercontent.com/docker/cli/master/LICENSE). Copyright Docker, Inc."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: docker save"
tags: [docker, save, images, tar, cli]
client: Librarian
sources:
  - id: S1
    title: "docker image save"
    publisher: Docker docs
    url: https://docs.docker.com/reference/cli/docker/image/save/
    accessed: 2026-11-18
    license: "Apache-2.0"
  - id: S2
    title: "image save reference"
    publisher: docker/cli
    url: https://github.com/docker/cli/blob/master/docs/reference/commandline/image_save.md
    accessed: 2026-11-18
    license: "Apache-2.0"
---
# Docker save: write images to a tar archive
**Answer:** docker save produces a tarred repository to the standard output stream. The alias docker image save is the same command. Use the --platform option to specify which platform variant of the image to save. The -o option writes to a file, instead of STDOUT.

## Examples

```bash
docker save -o backup.tar myimage:1.0
docker image save --platform linux/amd64 myimage
```

## Notes

The archive contains all parent layers, and all tags plus versions, or a specified repo:tag, for each argument provided. Architecture and variant are optional, and default to the daemon native architecture if omitted. The resulting archive can be used with docker load.

## Reference list

- `save` writes a tarred repository to standard output.
- `platform` --platform selects which image variant to save.

## See also

- [docker-compose-basics](https://iinventedlight.com/library/notes/docker-compose-basics/)
- [docker-multi-stage-builds](https://iinventedlight.com/library/notes/docker-multi-stage-builds/)

## Claims

- id: C1
  claim: save writes a tarred repository to standard output.
  source: S1
  evidence: "Produces a tarred repository to the standard output stream"

- id: C2
  claim: --platform selects which image variant to save.
  source: S1
  evidence: "Use the --platform option to specify which platform variant of the image to save"

- id: C3
  claim: The CLI page describes a backup that docker load can read.
  source: S2
  evidence: "Create a backup that can then be used with `docker load`"

## Sources

- [S1] docker image save. Docker docs. https://docs.docker.com/reference/cli/docker/image/save/ . License: Apache-2.0. Accessed 2026-11-18.

- [S2] image save reference. docker/cli. https://github.com/docker/cli/blob/master/docs/reference/commandline/image_save.md . License: Apache-2.0. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker docs, docker image save; docker/cli, image save reference. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Apache-2.0 (https://raw.githubusercontent.com/docker/cli/master/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
