Repository navigation
[container]: add container export for live containers - #1630
Merged
Merged
Conversation
Contributor
|
@saehejkang Let's tackle these two PRs right after next week's release. |
jglogan
self-requested a review
June 15, 2026 17:45
jglogan
reviewed
Jun 21, 2026
jglogan
left a comment
Contributor
There was a problem hiding this comment.
@saehejkang see the suggestion for simplifying this change. What do you think?
Code Coverage
|
saehejkang
force-pushed
the
live-flag-for-container-export
branch
2 times, most recently
from
July 5, 2026 10:44
253a941 to
c8a9cdf
Compare
stephenlclarke
added a commit
to stephenlclarke/container-compose
that referenced
this pull request
Jul 12, 2026
Treat omitted compose commit --index and --index=0 like Docker Compose's unset service-container selection, while keeping explicit positive indexes targeted and rejecting negative indexes. Refresh commit parity docs and runtime blocker references now that apple/containerization#685 has landed and apple/container#1630 plus apple/container#1762 track the remaining live export/commit path.
saehejkang
force-pushed
the
live-flag-for-container-export
branch
from
July 15, 2026 04:16
18751f8 to
912a240
Compare
container export for live containers
Contributor
|
Local test configuration, run entrypoint.sh #!/bin/sh
#
# Continuously writes random 256-byte files under /tmp/output.
#
set -eu
mkdir -p /tmp/output
while true; do
tmpfile=$(mktemp /tmp/output/.tmp.XXXXXX)
dd if=/dev/urandom of="$tmpfile" bs=1 count=256 2>/dev/null
hash=$(sha256sum "$tmpfile" | awk '{print $1}')
mv "$tmpfile" "/tmp/output/$hash"
doneDockerfile: FROM alpine:3.20
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]test.sh: |
jglogan
requested changes
Aug 1, 2026
Contributor
There was a problem hiding this comment.
Test feedback, from exporting with container and docker (via Colima):
EXPORT_OPTS=--live ./test.sh
CONTAINER=docker ./test.sh- Basic functionality looks good. With the
--liveflag, and for the first run, it works fine. - Please remove the
--liveflag, and instead, in the RuntimeService, just use the is-running detection result to determine whether freeze/thaw is necessary. The user shouldn't have to concern themselves with the state of the container. The test should pass using./test.shwithoutEXPORT_OPTS. container exportfails on back-to-back runs because it refuses to overwrite the output file (Error: “archive.tar” couldn’t be moved to “20260801-container-liveexport” because an item with the same name already exists.). The command should overwrite the previous file without consulting the user.
saehejkang
force-pushed
the
live-flag-for-container-export
branch
from
August 2, 2026 05:21
29e88e5 to
c6694ba
Compare
jglogan
approved these changes
Aug 2, 2026
This was referenced Aug 14, 2026
henrywang
added a commit
to henrywang/Berthly
that referenced
this pull request
Aug 15, 2026
## Summary - `container export`'s daemon-side guard was relaxed in 1.2.1 (apple/container#1630) to accept a running container (freeze/snapshot/thaw), not just a stopped one. Berthly's "Export Filesystem…" was still unconditionally disabled outside `.stopped`. - Adds `ContainerCompatibility.isAtLeast(installed:_:)` — a full major.minor.patch comparison, unlike `isCompatible`/`mismatch`'s major.minor-only floor (which is the right floor for overall daemon compatibility, but too coarse for gating one capability that landed in a specific patch). Gates the button on the connected daemon actually being 1.2.1+, so a user on an older daemon still sees it disabled instead of hitting a raw "container is not stopped" error. - Updates the one existing UI test whose assumption the fix invalidates (`testContainerContextMenuOnRunningShowsLifecycleActionsAndGates` — the mock reports daemon 1.2.2 since #109, so a running container's export is now correctly enabled). - Splits `ContainerCompatibilityTests` into its own file — the new `isAtLeast` tests would have pushed `BerthlyTests.swift` past the swiftlint file-length ratchet (which the project deliberately doesn't raise to absorb growth), and the project already splits large test groups out this way (`PruneSelectionTests.swift`, `ImageStalenessTests.swift`). ## Test plan - [x] `xcodebuild build` succeeds - [x] `BerthlyTests` suite passes, including new `isAtLeast` coverage - [x] `BerthlyUITests/ContextMenuTests` passes (all 15 tests, mock mode) - [x] `swiftlint lint --strict` — 0 violations Fixes #107
Closed
4 tasks
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.
Type of Change
Motivation and Context
Closes #1400
Testing