2023-09-01 01:54:47 +02:00
|
|
|
FROM golang:1.21.0-bookworm
|
2021-01-15 13:44:50 +01:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
git \
|
2023-09-01 01:54:47 +02:00
|
|
|
protobuf-compiler='3.21.12*' \
|
|
|
|
clang-format='1:14.0*'
|
2021-01-15 13:44:50 +01:00
|
|
|
|
|
|
|
# We don't want any default values for these variables to make sure they're
|
|
|
|
# explicitly provided by parsing the go.mod file. Otherwise we might forget to
|
|
|
|
# update them here if we bump the versions.
|
2021-07-27 12:59:59 +02:00
|
|
|
ARG PROTOBUF_VERSION
|
2021-01-15 13:44:50 +01:00
|
|
|
ARG GRPC_GATEWAY_VERSION
|
|
|
|
|
2021-07-27 12:59:59 +02:00
|
|
|
ENV PROTOC_GEN_GO_GRPC_VERSION="v1.1.0"
|
2021-07-26 19:00:45 +02:00
|
|
|
ENV FALAFEL_VERSION="v0.9.1"
|
2021-01-15 13:44:54 +01:00
|
|
|
ENV GOCACHE=/tmp/build/.cache
|
|
|
|
ENV GOMODCACHE=/tmp/build/.modcache
|
|
|
|
|
2021-01-15 13:44:50 +01:00
|
|
|
RUN cd /tmp \
|
2021-01-15 13:44:54 +01:00
|
|
|
&& mkdir -p /tmp/build/.cache \
|
|
|
|
&& mkdir -p /tmp/build/.modcache \
|
2021-10-22 08:51:37 +02:00
|
|
|
&& go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOBUF_VERSION} \
|
|
|
|
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@${PROTOC_GEN_GO_GRPC_VERSION} \
|
|
|
|
&& go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@${GRPC_GATEWAY_VERSION} \
|
|
|
|
&& go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@${GRPC_GATEWAY_VERSION} \
|
|
|
|
&& go install github.com/lightninglabs/falafel@${FALAFEL_VERSION} \
|
|
|
|
&& go install golang.org/x/tools/cmd/goimports@v0.1.7 \
|
2021-01-15 13:44:54 +01:00
|
|
|
&& chmod -R 777 /tmp/build/
|
2021-01-15 13:44:50 +01:00
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
|
|
|
|
CMD ["/bin/bash", "/build/lnrpc/gen_protos.sh"]
|