docker export mycontainer -o container.tar

Category: Docker

docker export mycontainer -o container.tar

Export a container's filesystem to a tarball

Archives the container's root filesystem as it currently exists, including runtime changes but not image metadata like layers or entrypoint. -o writes the file directly. Import with docker import to turn it back into an image.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.