Skip to content
Open
Show file tree
Hide file tree
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
23 changes: 21 additions & 2 deletions lib/functions/host/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,27 @@ function docker_cli_prepare() {
fi

#############################################################################################################
# Cleanup old Docker images to free disk space
docker_cleanup_old_images
# Optionally clean up old Docker images to free disk space. Off by
# default — set DOCKER_PRUNE=yes to opt in.
#
# The cleanup enumerates `docker images` and calls `docker rmi` on
# "old" ones. On hosts where several build invocations share one
# dockerd (the usual setup when multiple self-hosted GH Actions
# runners live on the same machine) two concurrent invocations
# race: runner A's cleanup can rmi an image runner B just
# committed between `Successfully built <sha>` and the daemon
# writing the imagedb digest file, surfacing as:
# failed to get digest sha256:…: open …/imagedb/content/sha256/…:
# no such file or directory
# which aborts runner B's build. Default-off keeps shared-daemon
# setups safe; single-host users who want automatic reclaim set
# DOCKER_PRUNE=yes and either accept the race risk or run builds
# serially.
if [[ "${DOCKER_PRUNE:-no}" == "yes" ]]; then
docker_cleanup_old_images
else
display_alert "Skipping Docker image cleanup" "set DOCKER_PRUNE=yes to enable" "debug"
fi

#############################################################################################################
# Detect some docker info; use cached.
Expand Down
7 changes: 7 additions & 0 deletions lib/functions/rootfs/rootfs-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ function create_new_rootfs_cache_via_debootstrap() {
"'--components=${AGGREGATED_DEBOOTSTRAP_COMPONENTS_COMMA}'" # from aggregation.py
"'--skip=check/empty'" # skips check if the rootfs dir is empty at start
)

# Show mmdebstrap's per-package download/install progress when
# DEBUG=yes. Default (no flag) keeps the terse log; DEBUG builds
# get the solver + fetch lines that are usually needed to
# diagnose a bootstrap failure.
[[ "${DEBUG}" == "yes" ]] && debootstrap_arguments+=("--verbose")

fetch_distro_keyring "$RELEASE"

# This is necessary to debootstrap from a non-official repo
Expand Down
Loading