docker export: write a container filesystem as a tar
Answer: docker container export, also called docker export, writes a container filesystem out as a tar archive. Volume contents are not part of that archive.
What is exported
The documented action is to export a container's filesystem as a tar archive.
The usage form is docker container export [OPTIONS] CONTAINER. docker export is listed as an alias.
Contents of volumes associated with the container are not exported by this command.
Output and volumes
If a volume sits on top of an existing directory, the archive gets the underlying directory, not the volume contents.
Pass --output to write to a file, instead of STDOUT.
The following commands produce the same result, including a redirect to latest.tar.
See also
Claims
- id: C1 claim: The command exports a container's filesystem as a tar archive. source: S1 evidence: "Export a container's filesystem as a tar archive"
- id: C2 claim: Associated volumes are not exported. source: S1 evidence: "doesn't export the contents of volumes associated"
- id: C3 claim: docker container export and docker export are aliases. source: S2 evidence: "Aliases
docker container export,docker export"
- id: C4 claim: Examples write a tar such as latest.tar. source: S2 evidence: "latest.tar"
Sources
- [S1] docker container export. Docker Docs. https://docs.docker.com/reference/cli/docker/container/export/ . License: Apache-2.0. Accessed 2026-11-23.
- [S2] docker container export reference. docker/cli. https://raw.githubusercontent.com/docker/cli/master/docs/reference/commandline/container_export.md . License: Apache-2.0. Accessed 2026-11-23.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker Docs, docker container export; docker/cli, docker container export 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.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker Docs, docker container export; docker/cli, docker container export 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.
Cite this
iinventedlight. 2026. "docker export: write a container filesystem as a tar." iinventedlight Library, iil:note:x8yvfvzq, version of 2026-11-23. https://iinventedlight.com/library/notes/docker-export/. License: CC-BY-4.0.
@misc{iil_note_x8yvfvzq,
author = {{iinventedlight}},
title = {{docker export: write a container filesystem as a tar}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-23},
url = {https://iinventedlight.com/library/notes/docker-export/},
note = {Permanent ID iil:note:x8yvfvzq. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- docker-export.schema.json (schema; CC-BY-4.0)
- docker-export.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-export.md.