mirror of
https://github.com/getumbrel/umbrel.git
synced 2026-10-12 02:14:08 +00:00
OS artifact builds now export the Docker build result directly as a root-filesystem tar instead of loading a multi-gigabyte image into Docker and exporting a temporary container. This preserves the BuildKit cache while avoiding a new dangling Docker image for every OS build. Local OS builds now remove transient Rugix state, Rugix build output, and imported rootfs tarballs on both successful and failed builds. GitHub Actions skips this cleanup automatically because its checkouts are ephemeral and release builds may share Rugix state while running concurrently. `umbrel-dev rebuild` continues using `--load`, because it needs a runnable container image, but now records the image used by the previous instance and removes it after the replacement container is running. Removal is deliberately non-forced so images still used by another tag or container are preserved. `npm run clean:worktrees` provides a manual full cleanup across every registered Git worktree. It removes OS build output, Rugix build output, legacy Rugix cache directories, and root/package-level `node_modules`, then reports how much disk space it freed. ## Why Repeated OS builds retained several independent copies of the root filesystem in Docker's image store, `rugix/.rugix`, `rugix/build`, and rootfs tarballs. On development machines these intermediates could consume hundreds of gigabytes in a day even though Umbrel intentionally starts each Rugix build from a fresh imported rootfs. Build artifacts and installed dependencies in inactive worktrees could also remain indefinitely and were cumbersome to locate and remove individually. ## Impact Local OS builds reclaim their temporary storage automatically, including on failure. Set `SKIP_OS_BUILD_CLEANUP=true` only when intermediates need to be preserved for debugging. Final `.img` and `.update` artifacts are not removed by automatic cleanup. The manual `npm run clean:worktrees` command intentionally removes all OS build outputs, including final artifacts, plus root and package-level `node_modules` from every registered worktree. It does not remove VM state or umbrel-dev instance data. `umbrel-dev` behavior is otherwise unchanged: it still builds and boots a Docker image, while repeated rebuilds no longer leave the superseded image dangling.
12 lines
418 B
JSON
12 lines
418 B
JSON
{
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "./scripts/umbrel-dev",
|
|
"dev:help": "npm run dev help",
|
|
"clean:worktrees": "./scripts/clean-worktrees",
|
|
"test:vm": "npm --prefix packages/os run build:amd64:rugix && rm -rf packages/os/rugix/build && npm --prefix packages/umbreld run test:vm --",
|
|
"build:remote": "./scripts/remote-builder build",
|
|
"test:remote": "./scripts/remote-builder test"
|
|
}
|
|
}
|