feat: add avocado save/load for portable build state archives#124
Merged
mobileoverlord merged 2 commits intomainfrom Apr 2, 2026
Merged
feat: add avocado save/load for portable build state archives#124mobileoverlord merged 2 commits intomainfrom
mobileoverlord merged 2 commits intomainfrom
Conversation
Add save and load commands that snapshot the entire Docker volume (SDK, extensions, runtimes, output artifacts, stamps) plus project config to a compressed tar.gz archive. This allows transferring build state between machines so that `avocado load` + `avocado provision` works without re-running install/build. - `avocado save -o state.tar.gz` exports volume + config - `avocado save -o state.tar.gz --include-src` also packs src_dir - `avocado load -i state.tar.gz` restores volume, config, and src
When --sdk-arch targets a different architecture than the host, Docker needs QEMU binfmt_misc to run the foreign-arch container. Docker Desktop has this built-in, but Linux Docker Engine does not. This detects the missing handler and auto-registers it via tonistiigi/binfmt, with a clear error message if registration fails.
6136e39 to
1eb294d
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
avocado saveandavocado loadcommands that snapshot the entire Docker volume (SDK, extensions, runtimes, output artifacts, stamps) plus project config to a compressed.tar.gzarchiveavocado save -o state.tar.gzexports volume + config;--include-srcoptionally packs thesrc_diravocado load -i state.tar.gzrestores everything soavocado provisionworks on a new machine without re-running install/buildgzpfor multi-threaded gzip compression across all CPU coresindicatiffor both save (withdu -sbfor total size) and load (file-size based)--sdk-archis used on LinuxTest plan
avocado save -o state.tar.gzproduces a valid archive afterinstall+buildavocado save --include-src -o state.tar.gzincludes source directory contentsavocado load -i state.tar.gzin a clean directory restores config + volumeavocado provisionworks after load without needing install/buildavocado loadwith existing.avocado-stateerrors without--forceavocado load --forceoverwrites existing statetar tzf state.tar.gzshows expectedavocado-state/layout