From 69a91d1755499fbc3f149305057669f59c246066 Mon Sep 17 00:00:00 2001 From: Dean Chen <862469039@qq.com> Date: Tue, 18 Aug 2026 14:51:13 +0500 Subject: [PATCH] docs: contrast docker export with docker save Both write a tar. export is a container filesystem; save keeps image layers and tags. Signed-off-by: Dean Chen <862469039@qq.com> --- docs/reference/commandline/container_export.md | 6 ++++++ docs/reference/commandline/image_save.md | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/docs/reference/commandline/container_export.md b/docs/reference/commandline/container_export.md index d974991f1f2f..516d152b9ba7 100644 --- a/docs/reference/commandline/container_export.md +++ b/docs/reference/commandline/container_export.md @@ -18,6 +18,12 @@ Export a container's filesystem as a tar archive ## Description +`docker export` writes the container's current filesystem as a flat tar +archive. It does not include image layers, tags, or history, so the +result is not a `docker save` image and cannot be loaded with +`docker load`. Use [`docker import`](image_import.md) to turn the +archive into a new image. + The `docker export` command doesn't export the contents of volumes associated with the container. If a volume is mounted on top of an existing directory in the container, `docker export` exports the contents of the underlying diff --git a/docs/reference/commandline/image_save.md b/docs/reference/commandline/image_save.md index 25b18a58fee0..1eacd9397262 100644 --- a/docs/reference/commandline/image_save.md +++ b/docs/reference/commandline/image_save.md @@ -23,6 +23,10 @@ Produces a tarred repository to the standard output stream. Contains all parent layers, and all tags + versions, or specified `repo:tag`, for each argument provided. +This is not the same as [`docker export`](container_export.md), which +archives a container's filesystem without image layers or tags. Use +`docker load` to restore a `docker save` archive. + ## Examples ### Create a backup that can then be used with `docker load`.