Skip to content

Commit

Permalink
Add support for BuildKit when building images
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfont authored and tmc committed Jul 16, 2023
1 parent 62ec97c commit 04eb6e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker/image.go
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
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

0 comments on commit 04eb6e4

Please sign in to comment.