Skip to content

Instantly share code, notes, and snippets.

@casesolved-co-uk
Created February 22, 2026 02:29
Show Gist options
  • Select an option

  • Save casesolved-co-uk/80979135e3c35054364b6dff981985b5 to your computer and use it in GitHub Desktop.

Select an option

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
# 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