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

feat: add support for BuildKit when building images #416

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ type BuildImageOptions struct {
SecurityOpt []string `qs:"securityopt"`
Target string `gs:"target"`
Platform string `qs:"platform"`
Version string `qs:"version"`
Context context.Context
}

Expand Down
3 changes: 3 additions & 0 deletions dockertest.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ type BuildOptions struct {
ContextDir string
BuildArgs []dc.BuildArg
Platform string
// Version specifies the builder to use. "1" for classic, "2" for BuildKit
Version string
}

// BuildAndRunWithBuildOptions builds and starts a docker container.
Expand All @@ -343,6 +345,7 @@ func (d *Pool) BuildAndRunWithBuildOptions(buildOpts *BuildOptions, runOpts *Run
ContextDir: buildOpts.ContextDir,
BuildArgs: buildOpts.BuildArgs,
Platform: buildOpts.Platform,
Version: buildOpts.Version,
})

if err != nil {
Expand Down
Loading