make+lnrpc: compile mobile RPC with docker too

Now that we have a base docker image that has all our RPC compilation
dependencies installed, we can also run the mobile RPC compilation
there. This removes the need to install falafel and goimports on the
local machine.
This commit is contained in:
Oliver Gugger committed 2021-01-28 10:29:02 +01:00
1 parent 19f7670a5b
commit 3bcfe931f9
4 files changed
+19 -10

No files matched your search

+10 -1
View File
@@ -11,11 +11,20 @@ RUN apt-get update && apt-get install -y \
ARG PROTOC_GEN_VERSION
ARG GRPC_GATEWAY_VERSION
ENV FALAFEL_VERSION="v0.7.1"
ENV GOCACHE=/tmp/build/.cache
ENV GOMODCACHE=/tmp/build/.modcache
RUN cd /tmp \
&& mkdir -p /tmp/build/.cache \
&& mkdir -p /tmp/build/.modcache \
&& export GO111MODULE=on \
&& go get github.com/golang/protobuf/protoc-gen-go@${PROTOC_GEN_VERSION} \
&& go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@${GRPC_GATEWAY_VERSION} \
&& go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@${GRPC_GATEWAY_VERSION}
&& go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@${GRPC_GATEWAY_VERSION} \
&& go get github.com/lightninglabs/falafel@${FALAFEL_VERSION} \
&& go get golang.org/x/tools/cmd/goimports \
&& chmod -R 777 /tmp/build/
WORKDIR /build
+6
View File
@@ -42,3 +42,9 @@ pushd lnrpc
format
generate
popd
if [[ "$COMPILE_MOBILE" == "1" ]]; then
pushd mobile
./gen_bindings.sh $FALAFEL_VERSION
popd
fi
+1
View File
@@ -19,5 +19,6 @@ docker run \
--rm \
--user "$UID:$(id -g)" \
-e UID=$UID \
-e COMPILE_MOBILE \
-v "$DIR/../:/build" \
lnd-protobuf-builder