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 alnr committed Jun 13, 2024
1 parent 1857a96 commit 658a2f4
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
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

0 comments on commit 658a2f4

Please sign in to comment.