Skip to content

Commit

Permalink
vendor dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Anda Xu <anda.xu@docker.com>
  • Loading branch information
AntaresS committed Aug 20, 2018
1 parent ef09ca8 commit acf43b6
Show file tree
Hide file tree
Showing 14 changed files with 171 additions and 89 deletions.
4 changes: 2 additions & 2 deletions cli/command/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (cli *DockerCli) initializeFromClient() {
cli.serverInfo = ServerInfo{
HasExperimental: ping.Experimental,
OSType: ping.OSType,
BuildkitEnabled: ping.Buildkit,
BuildkitVersion: ping.BuilderVersion,
}
cli.client.NegotiateAPIVersionPing(ping)
}
Expand Down Expand Up @@ -242,7 +242,7 @@ func (cli *DockerCli) NewContainerizedEngineClient(sockPath string) (containeriz
type ServerInfo struct {
HasExperimental bool
OSType string
BuildkitEnabled bool
BuildkitVersion types.BuilderVersion
}

// ClientInfo stores details about the supported features of the client
Expand Down
13 changes: 11 additions & 2 deletions cli/command/image/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"

"github.com/docker/cli/cli"
Expand Down Expand Up @@ -180,7 +181,15 @@ func (out *lastProgressOutput) WriteProgress(prog progress.Progress) error {

// nolint: gocyclo
func runBuild(dockerCli command.Cli, options buildOptions) error {
if dockerCli.ServerInfo().BuildkitEnabled && dockerCli.ServerInfo().HasExperimental {
if buildkitEnv := os.Getenv("DOCKER_BUILDKIT"); buildkitEnv != "" {
enableBuildkit, err := strconv.ParseBool(buildkitEnv)
if err != nil {
return errors.Wrap(err, "DOCKER_BUILDKIT environment variable expects boolean value")
}
if enableBuildkit {
return runBuildBuildKit(dockerCli, options)
}
} else if dockerCli.ServerInfo().BuildkitVersion == types.BuilderBuildKit {
return runBuildBuildKit(dockerCli, options)
}

Expand Down Expand Up @@ -272,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 acf43b6

Please sign in to comment.