Skip to content

Commit e3605d7

Browse files
committed
bump docker/docker to a30990b3c8d0d42280fa501287859e1d2393a951
full diff: moby/moby@b6684a4...a30990b relevant changes: - moby/moby#39995 Update containerd binary to v1.2.10 - moby/moby#40001 Update runc to v1.0.0-rc8-92-g84373aaa (CVE-2019-16884) - moby/moby#39999 bump golang 1.13.1 (CVE-2019-16276) - moby/moby#40102 bump golang 1.13.3 (CVE-2019-17596) - moby/moby#39994 homedir: add cgo or osusergo buildtag constraints for unix. This is to ensure that users of the homedir package cannot compile statically (`CGO_ENABLED=0`) without also setting the `osusergo` build tag. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 146d29c commit e3605d7

File tree

28 files changed

+133
-91
lines changed

28 files changed

+133
-91
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ clean: ## remove build artifacts
1212

1313
.PHONY: test-unit
1414
test-unit: ## run unit tests, to change the output format use: GOTESTSUM_FORMAT=(dots|short|standard-quiet|short-verbose|standard-verbose) make test-unit
15-
gotestsum $(TESTFLAGS) -- $${TESTDIRS:-$(shell go list ./... | grep -vE '/vendor/|/e2e/')}
15+
gotestsum $(TESTFLAGS) -- -tags osusergo $${TESTDIRS:-$(shell go list ./... | grep -vE '/vendor/|/e2e/')}
1616

1717
.PHONY: test
1818
test: test-unit ## run tests
1919

2020
.PHONY: test-coverage
2121
test-coverage: ## run test coverage
22-
gotestsum -- -coverprofile=coverage.txt $(shell go list ./... | grep -vE '/vendor/|/e2e/')
22+
gotestsum -- -tags osusergo -coverprofile=coverage.txt $(shell go list ./... | grep -vE '/vendor/|/e2e/')
2323

2424
.PHONY: fmt
2525
fmt:

cli/config/config.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import (
66
"os"
77
"path/filepath"
88
"strings"
9+
"sync"
10+
11+
"github.com/docker/docker/pkg/homedir"
912

1013
"github.com/docker/cli/cli/config/configfile"
1114
"github.com/docker/cli/cli/config/credentials"
1215
"github.com/docker/cli/cli/config/types"
13-
"github.com/docker/docker/pkg/homedir"
1416
"github.com/pkg/errors"
1517
)
1618

@@ -23,17 +25,20 @@ const (
2325
)
2426

2527
var (
26-
configDir = os.Getenv("DOCKER_CONFIG")
28+
initConfigDir sync.Once
29+
configDir string
2730
)
2831

29-
func init() {
32+
func setConfigDir() {
33+
configDir = os.Getenv("DOCKER_CONFIG")
3034
if configDir == "" {
3135
configDir = filepath.Join(homedir.Get(), configFileDir)
3236
}
3337
}
3438

3539
// Dir returns the directory the configuration file is stored in
3640
func Dir() string {
41+
initConfigDir.Do(setConfigDir)
3742
return configDir
3843
}
3944

scripts/build/binary

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ source ./scripts/build/.variables
99

1010
echo "Building statically linked $TARGET"
1111
export CGO_ENABLED=0
12-
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
12+
echo go build -o "${TARGET}" -tags osusergo --ldflags "${LDFLAGS}" "${SOURCE}"
13+
go build -o "${TARGET}" -tags osusergo --ldflags "${LDFLAGS}" "${SOURCE}"
1314

1415
ln -sf "$(basename "${TARGET}")" build/docker

scripts/build/plugins

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ for p in cli-plugins/examples/* "$@" ; do
1717

1818
echo "Building statically linked $TARGET"
1919
export CGO_ENABLED=0
20-
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "github.com/docker/cli/${p}"
20+
go build -o "${TARGET}" -tags osusergo --ldflags "${LDFLAGS}" "github.com/docker/cli/${p}"
2121
done

scripts/docs/generate-man.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mkdir -p ./man/man1
77
go install ./vendor/github.com/cpuguy83/go-md2man
88

99
# Generate man pages from cobra commands
10-
go build -o /tmp/gen-manpages github.com/docker/cli/man
10+
go build -tags osusergo -o /tmp/gen-manpages github.com/docker/cli/man
1111
/tmp/gen-manpages --root "$(pwd)" --target "$(pwd)/man/man1"
1212

1313
# Generate legacy pages from markdown

vendor.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ github.com/davecgh/go-spew 8991bc29aa16c548c550c7ff7826
1616
github.com/dgrijalva/jwt-go a2c85815a77d0f951e33ba4db5ae93629a1530af
1717
github.com/docker/compose-on-kubernetes cc4914dfd1b6684a9750a59f3613fc0a95291824 # v0.4.23
1818
github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580
19-
github.com/docker/docker b6684a403c99aaf6be5b8ce0bef3c6650fcdcd12
19+
github.com/docker/docker a30990b3c8d0d42280fa501287859e1d2393a951
2020
github.com/docker/docker-credential-helpers 54f0238b6bf101fc3ad3b34114cb5520beb562f5 # v0.6.3
2121
github.com/docker/go d30aec9fd63c35133f8f79c3412ad91a3b08be06 # Contains a customized version of canonical/json and is used by Notary. The package is periodically rebased on current Go versions.
2222
github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0

vendor/github.com/docker/docker/api/types/client.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/docker/api/types/filters/parse.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/docker/api/types/swarm/service.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/docker/client/container_list.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)