Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make -f docker.Makefile binary : failed from 17.11 onwards #823

Closed
rkgade opened this issue Jan 20, 2018 · 5 comments
Closed

make -f docker.Makefile binary : failed from 17.11 onwards #823

rkgade opened this issue Jan 20, 2018 · 5 comments

Comments

@rkgade
Copy link

rkgade commented Jan 20, 2018

Description

make binary on Linux for Linux failed for 17.11, 17.12 and 18.01 with
"ERROR: ncurses-terminfo-6.0_p20170930-r0: Protocol error".

Steps to reproduce the issue:

  1. checkout 17.11 branch or later ones
  2. execute 'make -f docker.Makefile binary'
  3. check stdout for error output.

Observed :

  • 17.10 uses golang:1.8.3-alpine and later ones use golang:1.8.4-alpine3.6 or so.

Describe the results you received:
"--------------------------------------------"
rgade@hostname ~/go/src/github.com/docker/docker-ce/components/cli (17.10)
$ make -f docker.Makefile binary
docker build -t docker-cli-dev -f ./dockerfiles/Dockerfile.dev .
Sending build context to Docker daemon 20.73MB
Step 1/11 : FROM golang:1.8.3-alpine
---> 769df81e03d3
Step 2/11 : RUN apk add -U git make bash coreutils ca-certificates
---> Using cache
---> aeb310e7e3ef
Step 3/11 : ARG VNDR_SHA=a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
---> Using cache
---> fba985df8075
Step 4/11 : RUN go get -d github.com/LK4D4/vndr && cd /go/src/github.com/LK4D4/vndr && git checkout -q "$VNDR_SHA" && go build -v -o /usr/bin/vndr . && rm -rf /go/src/* /go/pkg/* /go/bin/*
---> Using cache
---> 350b5efd8f0d
Step 5/11 : ARG BINDATA_SHA=a0ff2567cfb70903282db057e799fd826784d41d
---> Using cache
---> 323532bf582a
Step 6/11 : RUN go get -d github.com/jteeuwen/go-bindata/go-bindata && cd /go/src/github.com/jteeuwen/go-bindata/go-bindata && git checkout -q "$BINDATA_SHA" && go build -v -o /usr/bin/go-bindata . && rm -rf /go/src/* /go/pkg/* /go/bin/*
---> Using cache
---> d3741d107374
Step 7/11 : ARG FILEWATCHER_SHA=2e12ea42f6c8c089b19e992145bb94e8adaecedb
---> Using cache
---> e8b8e4916932
Step 8/11 : RUN go get -d github.com/dnephin/filewatcher && cd /go/src/github.com/dnephin/filewatcher && git checkout -q "$FILEWATCHER_SHA" && go build -v -o /usr/bin/filewatcher . && rm -rf /go/src/* /go/pkg/* /go/bin/*
---> Using cache
---> 838c0b41972d
Step 9/11 : ENV CGO_ENABLED=0 PATH=$PATH:/go/src/github.com/docker/cli/build DISABLE_WARN_OUTSIDE_CONTAINER=1
---> Using cache
---> af6f39f0777b
Step 10/11 : WORKDIR /go/src/github.com/docker/cli
---> Using cache
---> bb40369b3533
Step 11/11 : CMD sh
---> Using cache
---> 3df12fde0004
Successfully built 3df12fde0004
Successfully tagged docker-cli-dev:latest
docker run --rm -e VERSION=17.10.0-ce -e GITCOMMIT -v "/home/rgade/go/src/github.com/docker/docker-ce/components/cli":/go/src/github.com/docker/cli docker-cli-dev make binary
WARNING: binary creates a Linux executable. Use cross for macOS or Windows.
./scripts/build/binary
Building statically linked build/docker-linux-amd64
rgade@hostname ~/go/src/github.com/docker/docker-ce/components/cli (17.10)
$ git checkout 17.11
Switched to branch '17.11'
Your branch is up to date with 'origin/17.11'.
rgade@hostname ~/go/src/github.com/docker/docker-ce/components/cli (17.11)
$ make -f docker.Makefile binary
docker build -t docker-cli-dev -f ./dockerfiles/Dockerfile.dev .
Sending build context to Docker daemon 20.94MB
Step 1/11 : FROM golang:1.8.4-alpine3.6
---> 4e0173715d6e
Step 2/11 : RUN apk add -U git make bash coreutils ca-certificates
---> Running in 823e2a6af03e
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/14) Installing ncurses-terminfo-base (6.0_p20170930-r0)
(2/14) Installing ncurses-terminfo (6.0_p20170930-r0)
(3/14) Installing ncurses-libs (6.0_p20170930-r0)
ERROR: ncurses-terminfo-6.0_p20170930-r0: Protocol error
(4/14) Installing readline (6.3.008-r5)
(5/14) Installing bash (4.3.48-r1)
Executing bash-4.3.48-r1.post-install
(6/14) Installing libattr (2.4.47-r6)
(7/14) Installing libacl (2.2.52-r3)
(8/14) Installing coreutils (8.27-r0)
(9/14) Installing libssh2 (1.8.0-r1)
(10/14) Installing libcurl (7.57.0-r0)
(11/14) Installing expat (2.2.0-r1)
(12/14) Installing pcre (8.41-r0)
(13/14) Installing git (2.13.5-r0)
(14/14) Installing make (4.2.1-r0)
Executing busybox-1.26.2-r7.trigger
1 error; 32 MiB in 25 packages
The command '/bin/sh -c apk add -U git make bash coreutils ca-certificates' returned a non-zero code: 1
make: *** [docker.Makefile:18: build_docker_image] Error 1
rgade@hostname ~/go/src/github.com/docker/docker-ce/components/cli (17.11)

"--------------------------------------------"

Describe the results you expected:

"Building statically linked build/docker-linux-amd64"
for all other versions as well.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

rgade@hostname ~/go/src/github.com/docker/docker-ce/components/cli (17.11) 
 $ docker version
Client:
 Version:	18.01.0-ce
 API version:	1.35
 Go version:	go1.9.2
 Git commit:	03596f51b1
 Built:	Sun Jan 14 23:10:39 2018
 OS/Arch:	linux/amd64
 Experimental:	false
 Orchestrator:	swarm

Server:
 Engine:
  Version:	18.01.0-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.2
  Git commit:	03596f51b1
  Built:	Sun Jan 14 23:11:14 2018
  OS/Arch:	linux/amd64
  Experimental:	false

Output of docker info:

 $ docker info
Containers: 8
 Running: 0
 Paused: 0
 Stopped: 8
Images: 60
Server Version: 18.01.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.77-1-MANJARO
Operating System: Manjaro Linux
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.26GiB
Name: <hostname>
ID: 4NE5:5FCM:NJVY:D7ID:V253:IBXS:PTCV:SZ44:57P6:JCXY:CAYS:PQAS
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false


Additional environment details (AWS, VirtualBox, physical, etc.):

$ uname -a
Linux 4.9.77-1-MANJARO #1 SMP PREEMPT Wed Jan 17 23:04:54 UTC 2018 x86_64 GNU/Linux

Update
Build passing upon changing alpine version in 17.11 from golang:1.8.4-alpine3.6 to golang:1.8.3 .
check output below.

Does golang:1.8.4-alpine3.6 contain breaking changes from golang:1.8.3 ?


$ make -f docker.Makefile binary
docker build -t docker-cli-dev -f ./dockerfiles/Dockerfile.dev .
Sending build context to Docker daemon 20.94MB
Step 1/11 : FROM golang:1.8.3-alpine
---> 769df81e03d3
Step 2/11 : RUN apk add -U git make bash coreutils ca-certificates
---> Using cache
---> aeb310e7e3ef
Step 3/11 : ARG VNDR_SHA=a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
---> Using cache
---> fba985df8075
Step 4/11 : RUN go get -d github.com/LK4D4/vndr && cd /go/src/github.com/LK4D4/vndr && git checkout -q "$VNDR_SHA" && go build -v -o /usr/bin/vndr . && rm -rf /go/src/* /go/pkg/* /go/bin/*
---> Using cache
---> 350b5efd8f0d
Step 5/11 : ARG BINDATA_SHA=a0ff2567cfb70903282db057e799fd826784d41d
---> Using cache
---> 323532bf582a
Step 6/11 : RUN go get -d github.com/jteeuwen/go-bindata/go-bindata && cd /go/src/github.com/jteeuwen/go-bindata/go-bindata && git checkout -q "$BINDATA_SHA" && go build -v -o /usr/bin/go-bindata . && rm -rf /go/src/* /go/pkg/* /go/bin/*
---> Using cache
---> d3741d107374
Step 7/11 : ARG FILEWATCHER_SHA=2e12ea42f6c8c089b19e992145bb94e8adaecedb
---> Using cache
---> e8b8e4916932
Step 8/11 : RUN go get -d github.com/dnephin/filewatcher && cd /go/src/github.com/dnephin/filewatcher && git checkout -q "$FILEWATCHER_SHA" && go build -v -o /usr/bin/filewatcher . && rm -rf /go/src/* /go/pkg/* /go/bin/*
---> Using cache
---> 838c0b41972d
Step 9/11 : ENV CGO_ENABLED=0 PATH=$PATH:/go/src/github.com/docker/cli/build DISABLE_WARN_OUTSIDE_CONTAINER=1
---> Using cache
---> af6f39f0777b
Step 10/11 : WORKDIR /go/src/github.com/docker/cli
---> Using cache
---> bb40369b3533
Step 11/11 : CMD sh
---> Using cache
---> 3df12fde0004
Successfully built 3df12fde0004
Successfully tagged docker-cli-dev:latest
docker run --rm -e VERSION=17.11.0-ce -e GITCOMMIT -v "/home/rgade/go/src/github.com/docker/docker-ce/components/cli":/go/src/github.com/docker/cli docker-cli-dev make binary
WARNING: binary creates a Linux executable. Use cross for macOS or Windows.
./scripts/build/binary
Building statically linked build/docker-linux-amd64
rgade@hostname ~/go/src/github.com/docker/docker-ce/components/cli (17.11)
$ ./build/docker version
Client:
Version: 17.11.0-ce
API version: 1.34
Go version: go1.8.3
Git commit:
Built: Sat Jan 20 19:26:17 2018
OS/Arch: linux/amd64

Server:
Version: 18.01.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: 03596f5
Built: Sun Jan 14 23:11:14 2018
OS/Arch: linux/amd64
Experimental: false


@rkgade
Copy link
Author

rkgade commented Jan 20, 2018

Update
Build passing upon changing golang image version in 17.11 from golang:1.8.4-alpine3.6 to golang:1.8.3 .
check output in the last section above.

Does golang:1.8.4-alpine3.6 contain breaking changes from golang:1.8.3 ?

@rkgade
Copy link
Author

rkgade commented Jan 20, 2018

Update
Tried to change golang image version from 1.9.2-alpine3.6 to 1.8.3 .
Complained about one more code change with "=" (type alias). This is because of change in go v1.9. ( https://golang.org/doc/go1.9)
Build passed and was able to create binary after the below changes.
Output is from 'git log'.

rgade@hostname ~/go/src/github.com/docker/docker-ce/components/cli (18.01)
$ git log -p -1
commit dd7b60e8632d2aca28029d232a26875a99320770 (HEAD -> 18.01)
Author: Raj Kiran Gade rajkiran.gade@gmail.com
Date: Sun Jan 21 01:40:54 2018 +0530

modified golang:1.9.2-alpine3.6 to golang:1.8.3 for build test

diff --git a/components/cli/cli/command/stack/kubernetes/loader.go b/components/cli/cli/command/stack/kubernetes/loader.go
index c32517527a..e3444c8869 100644
--- a/components/cli/cli/command/stack/kubernetes/loader.go
+++ b/components/cli/cli/command/stack/kubernetes/loader.go
@@ -84,7 +84,7 @@ func load(name string, binary []byte, workingDir string, env map[string]string)
}, cfg, nil
}

-type iMap = map[string]interface{}
+type iMap map[string]interface{}

func processEnvFiles(input string, parsed map[string]interface{}, config *composetypes.Config) (string, error) {
changed := false
diff --git a/components/cli/dockerfiles/Dockerfile.dev b/components/cli/dockerfiles/Dockerfile.dev
index 5459051901..de30398389 100644
--- a/components/cli/dockerfiles/Dockerfile.dev
+++ b/components/cli/dockerfiles/Dockerfile.dev
@@ -1,5 +1,5 @@

-FROM golang:1.9.2-alpine3.6
+FROM golang:1.8.3-alpine

RUN apk add -U git make bash coreutils ca-certificates

@dnephin
Copy link
Contributor

dnephin commented Jan 22, 2018

I have not seen this problem, and we use this same docker image on CI without any problems.

@rkgade
Copy link
Author

rkgade commented Jan 23, 2018

@dnephin ok. any clue what might be the thing at my end? because I am still facing the same.

@dnephin
Copy link
Contributor

dnephin commented Jan 23, 2018

There are other reports of this error using alpine: https://stackoverflow.com/questions/47610296/alpine-package-install-protocol-error

It is most likely an issue with a proxy, or the apk repositories.

@rkgade rkgade closed this as completed Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants