mantl/mesos-consul

unable to build docker image

lusche opened this issue · 8 comments

Hi,

I'm not able to build the docker image.

Environment:
docker-engine.x86_64 17.03.0.ce-1.el7.centos
CentOS Linux release 7.3.1611 (Core)

Output:

docker build -t mesos-consul .
Sending build context to Docker daemon 375.8 kB
Step 1/5 : FROM gliderlabs/alpine:3.1
 ---> 9682e177c397
Step 2/5 : MAINTAINER Chris Aubuchon <Chris.Aubuchon@gmail.com>
 ---> Running in e5a6f3e917f8
 ---> a41de558a5f1
Removing intermediate container e5a6f3e917f8
Step 3/5 : COPY . /go/src/github.com/CiscoCloud/mesos-consul
 ---> 00fe96d96b80
Removing intermediate container df72e2cee01a
Step 4/5 : RUN apk add --update go git mercurial 	&& cd /go/src/github.com/CiscoCloud/mesos-consul 	&& export GOPATH=/go 	&& go get 	&& go build -o /bin/mesos-consul 	&& rm -rf /go 	&& apk del --purge go git mercurial
 ---> Running in aceb14f34aaa
fetch http://alpine.gliderlabs.com/alpine/v3.1/main/x86_64/APKINDEX.tar.gz
(1/21) Installing go (1.3.3-r1)
(2/21) Installing run-parts (4.4-r0)
(3/21) Installing openssl (1.0.1u-r0)
(4/21) Installing lua5.2-libs (5.2.3-r0)
(5/21) Installing lua5.2 (5.2.3-r0)
(6/21) Installing lua5.2-posix (32-r1)
(7/21) Installing ca-certificates (20141019-r0)
(8/21) Installing libssh2 (1.4.3-r1)
(9/21) Installing curl (7.49.1-r4)
(10/21) Installing expat (2.1.1-r1)
(11/21) Installing pcre (8.38-r0)
(12/21) Installing git (2.2.1-r0)
(13/21) Installing libbz2 (1.0.6-r3)
(14/21) Installing libffi (3.0.13-r0)
(15/21) Installing gdbm (1.11-r0)
(16/21) Installing ncurses-terminfo-base (5.9-r3)
(17/21) Installing ncurses-libs (5.9-r3)
(18/21) Installing readline (6.3-r3)
(19/21) Installing sqlite-libs (3.8.10.2-r1)
(20/21) Installing python (2.7.12-r0)
(21/21) Installing mercurial (3.2.2-r2)
Executing busybox-1.22.1-r15.trigger
Executing ca-certificates-20141019-r0.trigger
OK: 174 MiB in 36 packages
package github.com/hashicorp/consul/api
	imports context: unrecognized import path "context"
package github.com/hashicorp/consul/api
	imports github.com/hashicorp/go-cleanhttp
	imports github.com/hashicorp/serf/coordinate
	imports github.com/ogier/pflag
	imports github.com/sirupsen/logrus
	imports github.com/mesos/mesos-go/upid
	imports github.com/mesos/mesos-go/upid
	imports github.com/mesos/mesos-go/upid: cannot find package "github.com/mesos/mesos-go/upid" in any of:
	/usr/lib/go/src/pkg/github.com/mesos/mesos-go/upid (from $GOROOT)
	/go/src/github.com/mesos/mesos-go/upid (from $GOPATH)
package github.com/hashicorp/consul/api
	imports github.com/hashicorp/go-cleanhttp
	imports github.com/hashicorp/serf/coordinate
	imports github.com/ogier/pflag
	imports github.com/sirupsen/logrus
	imports github.com/mesos/mesos-go/upid
	imports github.com/mesos/mesos-go/detector
	imports github.com/mesos/mesos-go/detector
	imports github.com/mesos/mesos-go/detector: cannot find package "github.com/mesos/mesos-go/detector" in any of:
	/usr/lib/go/src/pkg/github.com/mesos/mesos-go/detector (from $GOROOT)
	/go/src/github.com/mesos/mesos-go/detector (from $GOPATH)
package github.com/hashicorp/consul/api
	imports github.com/hashicorp/go-cleanhttp
	imports github.com/hashicorp/serf/coordinate
	imports github.com/ogier/pflag
	imports github.com/sirupsen/logrus
	imports github.com/mesos/mesos-go/upid
	imports github.com/mesos/mesos-go/detector
	imports github.com/mesos/mesos-go/detector/zoo
	imports github.com/mesos/mesos-go/detector/zoo
	imports github.com/mesos/mesos-go/detector/zoo: cannot find package "github.com/mesos/mesos-go/detector/zoo" in any of:
	/usr/lib/go/src/pkg/github.com/mesos/mesos-go/detector/zoo (from $GOROOT)
	/go/src/github.com/mesos/mesos-go/detector/zoo (from $GOPATH)
package github.com/hashicorp/consul/api
	imports github.com/hashicorp/go-cleanhttp
	imports github.com/hashicorp/serf/coordinate
	imports github.com/ogier/pflag
	imports github.com/sirupsen/logrus
	imports github.com/mesos/mesos-go/upid
	imports github.com/mesos/mesos-go/detector
	imports github.com/mesos/mesos-go/detector/zoo
	imports github.com/mesos/mesos-go/mesosproto
	imports github.com/mesos/mesos-go/mesosproto
	imports github.com/mesos/mesos-go/mesosproto: cannot find package "github.com/mesos/mesos-go/mesosproto" in any of:
	/usr/lib/go/src/pkg/github.com/mesos/mesos-go/mesosproto (from $GOROOT)
	/go/src/github.com/mesos/mesos-go/mesosproto (from $GOPATH)
The command '/bin/sh -c apk add --update go git mercurial 	&& cd /go/src/github.com/CiscoCloud/mesos-consul 	&& export GOPATH=/go 	&& go get 	&& go build -o /bin/mesos-consul 	&& rm -rf /go 	&& apk del --purge go git mercurial' returned a non-zero code: 1

I don't know if there's anybody that can merge it but PR #112 fixes the docker build

PR #112 has a Travis Error.

Also, we can probably move this project to mantl and give @ChrisAubuchon ownership.

Had to fix the Travis config. Way out of date. Good now.

MrMic commented

Cannot build the image for the same reasons, previously mentionned !!!

#112 has been merged, please let me know if this resolves the issue.

MrMic commented

Hi, thanks for the quick reply.
It compiles now !
I can find the docker image.
For me, you can close the ticket.

Thanks for the good job.
Need to play with it, from now on ... :)

Thank you sir!

Similar issue (with slightly different error message):

docker build -t mesos-consul .
Sending build context to Docker daemon 426 kB
Step 1 : FROM golang:1.7.5-alpine3.5
---> 42f43f20fe48
Step 2 : MAINTAINER Chris Aubuchon Chris.Aubuchon@gmail.com
---> Using cache
---> cd8ff1ab7f85
Step 3 : ENV http_proxy http://172.31.101.80:8888
---> Using cache
---> 972f366661d4
Step 4 : ENV https_proxy http://172.31.101.80:8888
---> Using cache
---> 802c914ceffe
Step 5 : COPY . /go/src/github.com/CiscoCloud/mesos-consul
---> Using cache
---> a830e7ebd987
Step 6 : RUN apk add --update make git glide && cd /go/src/github.com/CiscoCloud/mesos-consul && make vendor && go build -o /bin/mesos-consul && rm -rf /go && apk del --purge make git glide
---> Running in 67bc7b17d9cd
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/7) Installing libssh2 (1.7.0-r2)
(2/7) Installing libcurl (7.52.1-r3)
(3/7) Installing expat (2.2.0-r0)
(4/7) Installing pcre (8.39-r0)
(5/7) Installing git (2.11.2-r0)
(6/7) Installing glide (0.12.3-r0)
(7/7) Installing make (4.2.1-r0)
Executing busybox-1.25.1-r0.trigger
OK: 32 MiB in 19 packages
glide install --strip-vendor
[WARN] The name listed in the config file (github.com/mantl/mesos-consul) does not match the current location (github.com/CiscoCloud/mesos-consul)
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching golang.org/x/net.
[INFO] --> Fetching github.com/hashicorp/consul.
[INFO] --> Fetching github.com/ogier/pflag.
[INFO] --> Fetching github.com/samuel/go-zookeeper.
[INFO] --> Fetching golang.org/x/sys.
[INFO] --> Fetching github.com/sirupsen/logrus.
[INFO] --> Fetching github.com/gogo/protobuf.
[INFO] --> Fetching github.com/hashicorp/serf.
[INFO] --> Fetching github.com/mesos/mesos-go.
[INFO] --> Fetching github.com/hashicorp/go-cleanhttp.
[INFO] --> Fetching github.com/golang/glog.
[INFO] Setting references.
[INFO] --> Setting version for github.com/gogo/protobuf to d2e1ade2d719b78fe5b061b4c18a9f7111b5bdc8.
[INFO] --> Setting version for github.com/mesos/mesos-go to 7228b13084ce3ea645dbf7c8ecb5704301a6eadf.
[INFO] --> Setting version for github.com/sirupsen/logrus to 7f4b1adc791766938c29457bed0703fb9134421a.
[INFO] --> Setting version for github.com/ogier/pflag to 45c278ab3607870051a2ea9040bb85fcb8557481.
[INFO] --> Setting version for github.com/hashicorp/consul to 9103e77f574254016406ee512d601ad6de6e1efd.
[INFO] --> Setting version for github.com/golang/glog to 23def4e6c14b4da8ac2ed8007337bc5eb5007998.
[INFO] --> Setting version for github.com/hashicorp/serf to f679d7594a349263f6118db40d87122d3a474e7d.
[INFO] --> Setting version for github.com/samuel/go-zookeeper to 1d7be4effb13d2d908342d349d71a284a7542693.
[INFO] --> Setting version for github.com/hashicorp/go-cleanhttp to ad28ea4487f05916463e2423a55166280e8254b5.
[INFO] --> Setting version for golang.org/x/sys to 30237cf4eefd639b184d1f2cb77a581ea0be8947.
[INFO] --> Setting version for golang.org/x/net to b4690f45fa1cafc47b1c280c2e75116efe40cc13.
[INFO] Exporting resolved dependencies...
[INFO] --> Exporting github.com/gogo/protobuf
[INFO] --> Exporting github.com/golang/glog
[INFO] --> Exporting github.com/hashicorp/consul
[INFO] --> Exporting github.com/mesos/mesos-go
[INFO] --> Exporting github.com/hashicorp/serf
[INFO] --> Exporting github.com/ogier/pflag
[INFO] --> Exporting github.com/sirupsen/logrus
[INFO] --> Exporting github.com/samuel/go-zookeeper
[INFO] --> Exporting github.com/hashicorp/go-cleanhttp
[INFO] --> Exporting golang.org/x/net
[INFO] --> Exporting golang.org/x/sys
[INFO] Replacing existing vendor dependencies
[INFO] Removing nested vendor and Godeps/_workspace directories...
[INFO] Removing: /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/hashicorp/consul/ui/tests/vendor
[INFO] Removing: /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/hashicorp/consul/vendor
[INFO] Removing: /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/hashicorp/serf/vendor
[INFO] Removing: /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/mesos/mesos-go/examples/Godeps/_workspace
[INFO] Removing Godep rewrites for /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/mesos/mesos-go/examples
glide update --strip-vendor
[WARN] The name listed in the config file (github.com/mantl/mesos-consul) does not match the current location (github.com/CiscoCloud/mesos-consul)
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching updates for github.com/ogier/pflag.
[INFO] --> Fetching updates for github.com/mesos/mesos-go.
[INFO] --> Fetching updates for github.com/sirupsen/logrus.
[INFO] --> Fetching updates for github.com/hashicorp/consul.
[INFO] --> Setting version for github.com/mesos/mesos-go to mesos-0.26.0.
[INFO] Resolving imports
[INFO] --> Fetching updates for golang.org/x/sys.
[INFO] --> Fetching updates for github.com/hashicorp/go-cleanhttp.
[INFO] --> Fetching updates for github.com/hashicorp/serf.
[INFO] --> Fetching updates for github.com/gogo/protobuf.
[INFO] --> Fetching updates for github.com/golang/glog.
[INFO] --> Fetching updates for golang.org/x/net.
[INFO] --> Fetching updates for github.com/samuel/go-zookeeper.
[INFO] Downloading dependencies. Please wait...
[INFO] Setting references for remaining imports
[INFO] Exporting resolved dependencies...
[INFO] --> Exporting github.com/hashicorp/consul
[INFO] --> Exporting github.com/mesos/mesos-go
[INFO] --> Exporting github.com/ogier/pflag
[INFO] --> Exporting github.com/sirupsen/logrus
[INFO] --> Exporting github.com/golang/glog
[INFO] --> Exporting github.com/hashicorp/go-cleanhttp
[INFO] --> Exporting github.com/hashicorp/serf
[INFO] --> Exporting github.com/samuel/go-zookeeper
[INFO] --> Exporting github.com/gogo/protobuf
[INFO] --> Exporting golang.org/x/sys
[INFO] --> Exporting golang.org/x/net
[INFO] Replacing existing vendor dependencies
[INFO] Versions did not change. Skipping glide.lock update.
[INFO] Project relies on 11 dependencies.
[INFO] Removing nested vendor and Godeps/_workspace directories...
[INFO] Removing: /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/hashicorp/consul/ui/tests/vendor
[INFO] Removing: /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/hashicorp/consul/vendor
[INFO] Removing: /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/hashicorp/serf/vendor
[INFO] Removing: /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/mesos/mesos-go/examples/Godeps/_workspace
[INFO] Removing Godep rewrites for /go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/mesos/mesos-go/examples
main.go:10:2: cannot find package "github.com/mantl/mesos-consul/config" in any of:
/go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/mantl/mesos-consul/config (vendor tree)
/usr/local/go/src/github.com/mantl/mesos-consul/config (from $GOROOT)
/go/src/github.com/mantl/mesos-consul/config (from $GOPATH)
main.go:11:2: cannot find package "github.com/mantl/mesos-consul/consul" in any of:
/go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/mantl/mesos-consul/consul (vendor tree)
/usr/local/go/src/github.com/mantl/mesos-consul/consul (from $GOROOT)
/go/src/github.com/mantl/mesos-consul/consul (from $GOPATH)
main.go:12:2: cannot find package "github.com/mantl/mesos-consul/mesos" in any of:
/go/src/github.com/CiscoCloud/mesos-consul/vendor/github.com/mantl/mesos-consul/mesos (vendor tree)
/usr/local/go/src/github.com/mantl/mesos-consul/mesos (from $GOROOT)
/go/src/github.com/mantl/mesos-consul/mesos (from $GOPATH)
The command '/bin/sh -c apk add --update make git glide && cd /go/src/github.com/CiscoCloud/mesos-consul && make vendor && go build -o /bin/mesos-consul && rm -rf /go && apk del --purge make git glide' returned a non-zero code: 1

ENV:

docker --version
Docker version 1.10.3, build cb079f6-unsupported
cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

Should I open separate issue for this?