Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 2775860

Browse files
authored
Merge pull request #2044 from thaJeztah/19.03_backport_bump_golang_1.12.8
[19.03 backport] Bump golang 1.12.8 (CVE-2019-9512, CVE-2019-9514) Upstream-commit: bf683dfe52248200519ccc5db9f8fc9bd87acfd1 Component: cli
2 parents 1c89ff0 + 41c3c59 commit 2775860

8 files changed

Lines changed: 26 additions & 18 deletions

File tree

components/cli/appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ clone_folder: c:\gopath\src\github.com\docker\cli
44

55
environment:
66
GOPATH: c:\gopath
7-
GOVERSION: 1.12.7
7+
GOVERSION: 1.12.8
88
DEPVERSION: v0.4.1
99

1010
install:

components/cli/docker.Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,32 @@ ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT -e PLATFORM -e TESTFLAGS -e TESTDIR
2727
.PHONY: build_docker_image
2828
build_docker_image:
2929
# build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment
30-
cat ./dockerfiles/Dockerfile.dev | docker build ${DOCKER_BUILD_ARGS} -t $(DEV_DOCKER_IMAGE_NAME) -
30+
cat ./dockerfiles/Dockerfile.dev | docker build ${DOCKER_BUILD_ARGS} --build-arg=GO_VERSION -t $(DEV_DOCKER_IMAGE_NAME) -
3131

3232
# build docker image having the linting tools (dockerfiles/Dockerfile.lint)
3333
.PHONY: build_linter_image
3434
build_linter_image:
3535
# build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment
36-
cat ./dockerfiles/Dockerfile.lint | docker build ${DOCKER_BUILD_ARGS} -t $(LINTER_IMAGE_NAME) -
36+
cat ./dockerfiles/Dockerfile.lint | docker build ${DOCKER_BUILD_ARGS} --build-arg=GO_VERSION -t $(LINTER_IMAGE_NAME) -
3737

3838
.PHONY: build_cross_image
3939
build_cross_image:
4040
# build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment
41-
cat ./dockerfiles/Dockerfile.cross | docker build ${DOCKER_BUILD_ARGS} -t $(CROSS_IMAGE_NAME) -
41+
cat ./dockerfiles/Dockerfile.cross | docker build ${DOCKER_BUILD_ARGS} --build-arg=GO_VERSION -t $(CROSS_IMAGE_NAME) -
4242

4343
.PHONY: build_shell_validate_image
4444
build_shell_validate_image:
4545
# build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment
46-
cat ./dockerfiles/Dockerfile.shellcheck | docker build -t $(VALIDATE_IMAGE_NAME) -
46+
cat ./dockerfiles/Dockerfile.shellcheck | docker build --build-arg=GO_VERSION -t $(VALIDATE_IMAGE_NAME) -
4747

4848
.PHONY: build_binary_native_image
4949
build_binary_native_image:
5050
# build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment
51-
cat ./dockerfiles/Dockerfile.binary-native | docker build -t $(BINARY_NATIVE_IMAGE_NAME) -
51+
cat ./dockerfiles/Dockerfile.binary-native | docker build --build-arg=GO_VERSION -t $(BINARY_NATIVE_IMAGE_NAME) -
5252

5353
.PHONY: build_e2e_image
5454
build_e2e_image:
55-
docker build -t $(E2E_IMAGE_NAME) --build-arg VERSION=$(VERSION) --build-arg GITCOMMIT=$(GITCOMMIT) -f ./dockerfiles/Dockerfile.e2e .
55+
docker build -t $(E2E_IMAGE_NAME) --build-arg=GO_VERSION --build-arg VERSION=$(VERSION) --build-arg GITCOMMIT=$(GITCOMMIT) -f ./dockerfiles/Dockerfile.e2e .
5656

5757
DOCKER_RUN_NAME_OPTION := $(if $(DOCKER_CLI_CONTAINER_NAME),--name $(DOCKER_CLI_CONTAINER_NAME),)
5858
DOCKER_RUN := docker run --rm $(ENVVARS) $(DOCKER_CLI_MOUNTS) $(DOCKER_RUN_NAME_OPTION)

components/cli/dockerfiles/Dockerfile.binary-native

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM golang:1.12.7-alpine
1+
ARG GO_VERSION=1.12.8
2+
3+
FROM golang:${GO_VERSION}-alpine
24

35
RUN apk add -U git bash coreutils gcc musl-dev
46

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM dockercore/golang-cross:1.12.7
1+
ARG GO_VERSION=1.12.8
2+
3+
FROM dockercore/golang-cross:${GO_VERSION}
24
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
35
WORKDIR /go/src/github.com/docker/cli
46
COPY . .

components/cli/dockerfiles/Dockerfile.dev

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM golang:1.12.7-alpine
1+
ARG GO_VERSION=1.12.8
2+
3+
FROM golang:${GO_VERSION}-alpine
24

35
RUN apk add -U git make bash coreutils ca-certificates curl
46

components/cli/dockerfiles/Dockerfile.e2e

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GO_VERSION=1.12.7
1+
ARG GO_VERSION=1.12.8
22

33
FROM docker/containerd-shim-process:a4d1531 AS containerd-shim-process
44

components/cli/dockerfiles/Dockerfile.lint

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM golang:1.12.7-alpine
1+
ARG GO_VERSION=1.12.8
2+
3+
FROM golang:${GO_VERSION}-alpine
24

35
RUN apk add -U git
46

components/cli/opts/hosts_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ func TestParseHost(t *testing.T) {
5353
func TestParseDockerDaemonHost(t *testing.T) {
5454
invalids := map[string]string{
5555

56-
"tcp:a.b.c.d": "Invalid bind address format: tcp:a.b.c.d",
57-
"tcp:a.b.c.d/path": "Invalid bind address format: tcp:a.b.c.d/path",
56+
"tcp:a.b.c.d": "",
57+
"tcp:a.b.c.d/path": "",
5858
"udp://127.0.0.1": "Invalid bind address format: udp://127.0.0.1",
5959
"udp://127.0.0.1:2375": "Invalid bind address format: udp://127.0.0.1:2375",
6060
"tcp://unix:///run/docker.sock": "Invalid proto, expected tcp: unix:///run/docker.sock",
@@ -83,7 +83,7 @@ func TestParseDockerDaemonHost(t *testing.T) {
8383
"localhost:5555/path": "tcp://localhost:5555/path",
8484
}
8585
for invalidAddr, expectedError := range invalids {
86-
if addr, err := parseDockerDaemonHost(invalidAddr); err == nil || err.Error() != expectedError {
86+
if addr, err := parseDockerDaemonHost(invalidAddr); err == nil || expectedError != "" && err.Error() != expectedError {
8787
t.Errorf("tcp %v address expected error %q return, got %q and addr %v", invalidAddr, expectedError, err, addr)
8888
}
8989
}
@@ -99,8 +99,8 @@ func TestParseTCP(t *testing.T) {
9999
defaultHTTPHost = "tcp://127.0.0.1:2376"
100100
)
101101
invalids := map[string]string{
102-
"tcp:a.b.c.d": "Invalid bind address format: tcp:a.b.c.d",
103-
"tcp:a.b.c.d/path": "Invalid bind address format: tcp:a.b.c.d/path",
102+
"tcp:a.b.c.d": "",
103+
"tcp:a.b.c.d/path": "",
104104
"udp://127.0.0.1": "Invalid proto, expected tcp: udp://127.0.0.1",
105105
"udp://127.0.0.1:2375": "Invalid proto, expected tcp: udp://127.0.0.1:2375",
106106
}
@@ -125,7 +125,7 @@ func TestParseTCP(t *testing.T) {
125125
"localhost:5555/path": "tcp://localhost:5555/path",
126126
}
127127
for invalidAddr, expectedError := range invalids {
128-
if addr, err := ParseTCPAddr(invalidAddr, defaultHTTPHost); err == nil || err.Error() != expectedError {
128+
if addr, err := ParseTCPAddr(invalidAddr, defaultHTTPHost); err == nil || expectedError != "" && err.Error() != expectedError {
129129
t.Errorf("tcp %v address expected error %v return, got %s and addr %v", invalidAddr, expectedError, err, addr)
130130
}
131131
}

0 commit comments

Comments
 (0)