Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fischermario/280b0368cc0a067ebdb817122c1a2682 to your computer and use it in GitHub Desktop.
Save fischermario/280b0368cc0a067ebdb817122c1a2682 to your computer and use it in GitHub Desktop.
pi@raspberrypi:~/mainflux $ sudo make dockers
docker build --build-arg SVC_NAME=users --tag=mainflux/users -f docker/Dockerfile .
Sending build context to Docker daemon 45.63MB
Step 1/8 : FROM golang:1.10-alpine AS builder
---> 3e259e2d90c3
Step 2/8 : ARG SVC_NAME
---> Using cache
---> c2da7c1d4fa2
Step 3/8 : WORKDIR /go/src/github.com/mainflux/mainflux
---> Using cache
---> bbc77de759d8
Step 4/8 : COPY . .
---> 68a768efb987
Step 5/8 : RUN apk update && apk add make protobuf git && go get -u github.com/golang/protobuf/protoc-gen-go && go get -u google.golang.org/grpc && make $SVC_NAME && mv build/mainflux-$SVC_NAME /exe
---> Running in efd0f9ca05eb
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/armhf/APKINDEX.tar.gz
v3.7.0-217-gfcc115cebf [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-216-g87a58154ba [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
OK: 8877 distinct packages available
(1/9) Installing libssh2 (1.8.0-r2)
(2/9) Installing libcurl (7.61.0-r0)
(3/9) Installing libgcc (6.4.0-r5)
(4/9) Installing expat (2.2.5-r0)
(5/9) Installing pcre2 (10.30-r0)
(6/9) Installing git (2.15.2-r0)
(7/9) Installing make (4.2.1-r0)
(8/9) Installing libstdc++ (6.4.0-r5)
(9/9) Installing protobuf (3.4.1-r1)
Executing busybox-1.27.2-r6.trigger
OK: 21 MiB in 21 packages
protoc --go_out=plugins=grpc:. *.proto
CGO_ENABLED=0 GOOS=linux GOARCH= GOARM= go build -ldflags "-s -w" -o build/mainflux-users cmd/users/main.go
vendor/google.golang.org/grpc/grpclb.go:30:2: cannot find package "google.golang.org/grpc/grpclb/grpc_lb_v1/messages" in any of:
/go/src/github.com/mainflux/mainflux/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages (vendor tree)
/usr/local/go/src/google.golang.org/grpc/grpclb/grpc_lb_v1/messages (from $GOROOT)
/go/src/google.golang.org/grpc/grpclb/grpc_lb_v1/messages (from $GOPATH)
make: *** [Makefile:29: users] Error 1
The command '/bin/sh -c apk update && apk add make protobuf git && go get -u github.com/golang/protobuf/protoc-gen-go && go get -u google.golang.org/grpc && make $SVC_NAME && mv build/mainflux-$SVC_NAME /exe' returned a non-zero code: 2
Makefile:32: recipe for target 'docker_users' failed
make: *** [docker_users] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment