Created
February 22, 2026 02:29
-
-
Save casesolved-co-uk/80979135e3c35054364b6dff981985b5 to your computer and use it in GitHub Desktop.
How to export and import a set of images and containers in docker to change storage driver to btrfs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # export script for currently running containers | |
| # You have to compile python >3.9, create venv, activate, install poetry, clone the autocompose git repo | |
| docker save -o /opt/all-images.tar $(docker images --format '{{.Repository}}:{{.Tag}}') | |
| cd /root/docker-autocompose; poetry run autocompose $(docker ps -aq) > /opt/compose.yml | |
| # for loading and starting saved containers and images | |
| docker load -i /opt/all-images.tar | |
| docker compose -f /opt/compose.yml up -d | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment