Skip to content

Commit

Permalink
Merge pull request #1275 from AntaresS/buildkit-support
Browse files Browse the repository at this point in the history
[enhancement] enable buildkit from daemon side
  • Loading branch information
andrewhsu authored Aug 20, 2018
2 parents 466e1b0 + acf43b6 commit 2461cd6
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 86 deletions.
2 changes: 2 additions & 0 deletions cli/command/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func (cli *DockerCli) initializeFromClient() {
cli.serverInfo = ServerInfo{
HasExperimental: ping.Experimental,
OSType: ping.OSType,
BuildkitVersion: ping.BuilderVersion,
}
cli.client.NegotiateAPIVersionPing(ping)
}
Expand Down Expand Up @@ -241,6 +242,7 @@ func (cli *DockerCli) NewContainerizedEngineClient(sockPath string) (containeriz
type ServerInfo struct {
HasExperimental bool
OSType string
BuildkitVersion types.BuilderVersion
}

// ClientInfo stores details about the supported features of the client
Expand Down
4 changes: 3 additions & 1 deletion cli/command/image/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ func runBuild(dockerCli command.Cli, options buildOptions) error {
if enableBuildkit {
return runBuildBuildKit(dockerCli, options)
}
} else if dockerCli.ServerInfo().BuildkitVersion == types.BuilderBuildKit {
return runBuildBuildKit(dockerCli, options)
}

var (
Expand Down Expand Up @@ -279,7 +281,7 @@ func runBuild(dockerCli command.Cli, options buildOptions) error {
excludes = build.TrimBuildFilesFromExcludes(excludes, relDockerfile, options.dockerfileFromStdin())
buildCtx, err = archive.TarWithOptions(contextDir, &archive.TarOptions{
ExcludePatterns: excludes,
ChownOpts: &idtools.IDPair{UID: 0, GID: 0},
ChownOpts: &idtools.Identity{UID: 0, GID: 0},
})
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion vendor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ github.com/cpuguy83/go-md2man v1.0.8
github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76 # v1.1.0
github.com/dgrijalva/jwt-go a2c85815a77d0f951e33ba4db5ae93629a1530af
github.com/docker/distribution 83389a148052d74ac602f5f1d62f86ff2f3c4aa5
github.com/docker/docker a7ff19d69a90dfe152abd146221c8b9b46a0903d
github.com/docker/docker 991682749612d6613d5f49035f62e2a479c0dc59
github.com/docker/docker-credential-helpers 5241b46610f2491efdf9d1c85f1ddf5b02f6d962
# the docker/go package contains a customized version of canonical/json
# and is used by Notary. The package is periodically rebased on current Go versions.
Expand Down
8 changes: 5 additions & 3 deletions vendor/github.com/docker/docker/api/types/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion vendor/github.com/docker/docker/client/ping.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 32 additions & 34 deletions vendor/github.com/docker/docker/pkg/archive/archive.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/github.com/docker/docker/pkg/archive/archive_unix.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/docker/docker/pkg/archive/diff.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2461cd6

Please sign in to comment.