Skip to content

Instantly share code, notes, and snippets.

@marxarelli
Last active August 25, 2025 21:14
Show Gist options
  • Select an option

  • Save marxarelli/d640189505167fa1dc99fdb57844f2ee to your computer and use it in GitHub Desktop.

Select an option

Save marxarelli/d640189505167fa1dc99fdb57844f2ee to your computer and use it in GitHub Desktop.
Using buildx bake with a remote context and keep git dir
target "default" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = "1"
}
}
FROM busybox AS source
COPY ./ /src/
RUN ls -la /src > /ls.out
FROM scratch AS output
COPY --from=source /ls.out /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment