mantl / mesos-consul

Mesos to Consul bridge for service discovery
Apache License 2.0
338 stars 95 forks source link

Build failing - Directory not empty #79

Open akamalov opened 8 years ago

akamalov commented 8 years ago

Trying to build mesos-consul, unfortunately getting errors:

[root@node236 mesos-consul]# docker build -t mesos-consul .
Sending build context to Docker daemon 331.8 kB
Step 1 : FROM gliderlabs/alpine:3.1
 ---> 49658ac01bf6
Step 2 : MAINTAINER Chris Aubuchon <Chris.Aubuchon@gmail.com>
 ---> Running in 1080bd0e3558
 ---> aa6d2bb3d8ab
Removing intermediate container 1080bd0e3558
Step 3 : COPY . /go/src/github.com/CiscoCloud/mesos-consul
 ---> 65772d7cdaf8
Removing intermediate container a657cd2bc73f
Step 4 : 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 48f821a34d3c
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.1s-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.39.0-r0)
(10/21) Installing expat (2.1.0-r1)
(11/21) Installing pcre (8.36-r2)
(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.9-r0)
(21/21) Installing mercurial (3.2.2-r0)
Executing busybox-1.22.1-r15.trigger
Executing ca-certificates-20141019-r0.trigger
OK: 173 MiB in 36 packages
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/hooks': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/info': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/logs/refs/heads': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/logs/refs/remotes/origin': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/logs/refs/remotes': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/logs/refs': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/logs': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/objects/pack': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/objects': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/refs/heads': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/refs/remotes/origin': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/refs/remotes': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git/refs': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/.git': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/config': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/consul': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/mesos': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/registry': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/state': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul/ubuntu': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud/mesos-consul': Directory not empty
rm: can't remove '/go/src/github.com/CiscoCloud': Directory not empty
rm: can't remove '/go/src/github.com': Directory not empty
rm: can't remove '/go/src': Directory not empty
rm: can't remove '/go': Directory not empty
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
[root@node236 mesos-consul]# 

Any help?

Thanks,

Alex

akamalov commented 8 years ago

There seem to be a problem in Dockerfile I had to comment out rm -rf /go:

FROM gliderlabs/alpine:3.3

MAINTAINER Chris Aubuchon <Chris.Aubuchon@gmail.com>
COPY . /go/src/github.com/CiscoCloud/mesos-consul
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

ENTRYPOINT [ "/bin/mesos-consul" ]

Once commented out, the built went through...