Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_disk: Create image layer refs by default #3359

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/create_disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,13 @@ if test -n "${deploy_via_container}"; then
deploy_commit=$(cat /tmp/commit.txt)
rm /tmp/commit.txt
else
# Pull the commit
time ostree container unencapsulate --repo=$rootfs/ostree/repo "${ostree_container}"
# Pull the container image...
time ostree container image pull $rootfs/ostree/repo "${ostree_container}"
# But we default to not leaving a ref for the image around, so the
# layers will get GC'd on the first update if the
# user doesn't switch to a container image.
ostree --repo=$rootfs/ostree/repo refs --delete ostree/container/image
ostree --repo=$rootfs/ostree/repo prune --refs-only --depth=0
# Deploy it, using an optional remote prefix
if test -n "${remote_name}"; then
deploy_ref="${remote_name}:${ref}"
Expand Down