mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-05-03 16:30:18 +02:00
lnrpc: fully dockerize protobuf generation
Remove the need for golang on the host by utilizing golang docker containers to obtain protobuf and grpc gateway versions.
This commit is contained in:
parent
51df3e5b1e
commit
7c7c95e58a
@ -5,8 +5,13 @@ set -e
|
|||||||
# Directory of the script file, independent of where it's called from.
|
# Directory of the script file, independent of where it's called from.
|
||||||
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
||||||
|
|
||||||
PROTOBUF_VERSION=$(go list -f '{{.Version}}' -m google.golang.org/protobuf)
|
# golang docker image version used in this script.
|
||||||
GRPC_GATEWAY_VERSION=$(go list -f '{{.Version}}' -m github.com/grpc-ecosystem/grpc-gateway/v2)
|
GO_IMAGE=golang:1.19.7-alpine
|
||||||
|
|
||||||
|
PROTOBUF_VERSION=$(docker run --rm -v $DIR/../:/lnd -w /lnd $GO_IMAGE \
|
||||||
|
go list -f '{{.Version}}' -m google.golang.org/protobuf)
|
||||||
|
GRPC_GATEWAY_VERSION=$(docker run --rm -v $DIR/../:/lnd -w /lnd $GO_IMAGE \
|
||||||
|
go list -f '{{.Version}}' -m github.com/grpc-ecosystem/grpc-gateway/v2)
|
||||||
|
|
||||||
echo "Building protobuf compiler docker image..."
|
echo "Building protobuf compiler docker image..."
|
||||||
docker build -t lnd-protobuf-builder \
|
docker build -t lnd-protobuf-builder \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user