Skip to content

Conversation

@deitch
Copy link
Collaborator

@deitch deitch commented Aug 28, 2025

- What I did
Added a --dry-run option to lkt pkg build, the same way we have one for lkt build, which reports the docker build command equivalent.
It is not 100% correct or as useful as the lkt build one, for a few reasons:

  • it prints the lines out to stdout, which already is kind of busy
  • it is not json or yaml, which are structured and both human and machine readable, but rather the docker build commands
  • lkt pkg build does not actually do docker build, but rather uses buildkit with a container as a driver. You cannot really replicate that simply with a single command-line

But it is a good start.

- How I did it
Added another dockerRunner implementation that is dryrun.

- How to verify it
Run it manually. This does not need testing, just that there are no regressions, for which CI is good enough.

- Description for the changelog

pkg build --dry-run

@deitch deitch force-pushed the pkg-build-dry-run branch from 70d3741 to 27bc67f Compare August 28, 2025 09:32
@deitch deitch merged commit 8d19b25 into linuxkit:master Aug 28, 2025
25 checks passed
@deitch deitch deleted the pkg-build-dry-run branch August 28, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant