Closed aaronlehmann closed 2 years ago
Example using merge and diff:
fs alpine() {
image "alpine"
}
fs busybox() {
image "busybox"
}
fs workspace() {
busybox
run "echo this is a test > /root/file1"
run "dd if=/dev/urandom bs=1024 count=100 of=/var/random"
run "rm /bin/zcat"
}
fs differences() {
workspace
diff busybox
}
fs workspaceRebased() {
alpine
merge differences
}
fs default() {
busybox
run "ls" with option {
breakpoint
mount workspace "/workspace"
mount differences "/differences"
mount workspaceRebased "/rebased"
}
}
Split out the DiffOp part to https://github.com/aaronlehmann/hlb/pull/2. Now that MergeOp is available in upstream BuildKit, this PR is ready for review.
Pulled the diff
builtin back into this PR, now that DiffOp is merged upstream in BuildKit.
Uses the new LLB "merge" and "diff" ops.
Example merge usage:
Example which uses merge and diff:
cc @sipsma