mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 05:13:36 +01:00
7692ced5f5
Since we now have a scripted check that makes sure the Golang version is synced throughout all files, it is important that the main version in the Makefile is changed, then all other versions can be detected by that script.
35 lines
1.3 KiB
Docker
35 lines
1.3 KiB
Docker
# If you change this please also update GO_VERSION in Makefile (then run
|
|
# `make lint` to see where else it needs to be updated as well).
|
|
FROM golang:1.22.6-bookworm
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
protobuf-compiler='3.21.12*' \
|
|
clang-format='1:14.0*'
|
|
|
|
# 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.
|
|
ARG PROTOBUF_VERSION
|
|
ARG GRPC_GATEWAY_VERSION
|
|
|
|
ENV PROTOC_GEN_GO_GRPC_VERSION="v1.1.0"
|
|
ENV FALAFEL_VERSION="v0.9.2"
|
|
ENV GOCACHE=/tmp/build/.cache
|
|
ENV GOMODCACHE=/tmp/build/.modcache
|
|
|
|
RUN cd /tmp \
|
|
&& mkdir -p /tmp/build/.cache \
|
|
&& mkdir -p /tmp/build/.modcache \
|
|
&& 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 \
|
|
&& chmod -R 777 /tmp/build/
|
|
|
|
WORKDIR /build
|
|
|
|
CMD ["/bin/bash", "/build/lnrpc/gen_protos.sh"]
|