Skip to content

Commit a70a46b

Browse files
committed
docker: add protoc to docker image
1 parent fdd6cb9 commit a70a46b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ENV GODEBUG netdns=cgo
1111
ENV GO111MODULE on
1212

1313
ENV NODE_VERSION=v12.17.0
14+
ENV PROTOC_VERSION=3.12.4
1415

1516
# Install dependencies and install/build lightning-terminal.
1617
RUN apk add --no-cache --update alpine-sdk \
@@ -20,11 +21,14 @@ RUN apk add --no-cache --update alpine-sdk \
2021
bash \
2122
binutils \
2223
tar \
24+
protobuf \
2325
&& touch ~/.bashrc \
2426
&& curl -sfSLO https://unofficial-builds.nodejs.org/download/release/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64-musl.tar.xz \
2527
&& tar -xf node-${NODE_VERSION}-linux-x64-musl.tar.xz -C /usr --strip 1 \
2628
&& rm node-${NODE_VERSION}-linux-x64-musl.tar.xz \
2729
&& curl -o- -L https://yarnpkg.com/install.sh | bash \
30+
&& curl -sfSLO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \
31+
&& unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip include/* -d /usr/local/ \
2832
&& /bin/bash \
2933
&& . ~/.bashrc \
3034
&& cd /go/src/github.com/lightninglabs/lightning-terminal \

app/scripts/build-protos.js

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const generate = async () => {
3030
const protocCmd = [
3131
'protoc',
3232
`--plugin=protoc-gen-ts=${protocGen}`,
33+
'--proto_path=/usr/local/include',
3334
'--proto_path=../proto',
3435
'--js_out=import_style=commonjs,binary:./src/types/generated',
3536
'--ts_out=service=grpc-web:./src/types/generated',
@@ -82,6 +83,7 @@ const main = async () => {
8283
await patch();
8384
} catch (error) {
8485
console.error(error);
86+
process.exit(1);
8587
}
8688
};
8789

0 commit comments

Comments
 (0)