Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for .dockerignore files #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tristanpemble
Copy link

Implements #12. This seems to work with my limited testing.

This is my first time writing or contributing anything in Go, so, caveat emptor

@tristanpemble tristanpemble force-pushed the dockerignore branch 2 times, most recently from 87fa9ce to f6ddf9f Compare February 22, 2022 04:00
@tristanpemble tristanpemble marked this pull request as draft February 22, 2022 04:01
@@ -55,6 +57,7 @@ func frontendBuild(nixImage string) client.BuildFunc {
localDfSt := llb.Local(localNameDockerfile,
llb.SessionID(c.BuildOpts().SessionID),
dockerfile2llb.WithInternalName("local dockerfile"),
llb.FollowPaths([]string{dfName}),
Copy link
Author

@tristanpemble tristanpemble Feb 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is actually going to get complicated.. relative Nix paths in the Dockerfile won't work anymore since this is being copied to /dockerfile/{dfName} and the context is in /context

@AkihiroSuda AkihiroSuda self-requested a review February 22, 2022 16:08
@AkihiroSuda AkihiroSuda added the enhancement New feature or request label Feb 22, 2022
@AkihiroSuda
Copy link
Member

AkihiroSuda commented Feb 22, 2022

Thanks, but looks like flake.lock is no longer copied into the dockerfile ctx?

#12 /self/buildkit-nix helper --filename=flake.nix
#12 sha256:d66b9fedc66b8d84730984cf095e9461ce0916bc23d5496de99cfb05cf950408
#12 0.276 time="2022-02-22T16:08:25Z" level=info msg="Populating cache from /cache into /nix"
#12 0.279 time="2022-02-22T16:08:25Z" level=info msg="Running [nix --extra-experimental-features nix-command --extra-experimental-features flakes build --option build-users-group  /dockerfile] (flake mode: true)"
#12 11.85 warning: creating lock file '/dockerfile/flake.lock'
#12 12.28 error: `runVend` has been replaced by `proxyVendor`
#12 12.28 (use '--show-trace' to show detailed location information)
#12 12.29 time="2022-02-22T16:08:37Z" level=fatal msg="exit status 1"
#12 ERROR: executor failed running [/self/buildkit-nix helper --filename=flake.nix]: exit code: 1

https://github.com/AkihiroSuda/buildkit-nix/runs/5291062997?check_suite_focus=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants