← All notes

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

Sources

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

Permanent ID: iil:note:x8yvfvzq

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.},
}

Markdown

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.

All artifact files (JSON index)

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.