# Dockerfile for gRPC Go and Protoc compilation
# Based on GRPC Docker Project
# https://github.com/grpc/grpc-docker-library/pull/69
# Build command - DOCKER_BUILDKIT=1 docker build -t grpc/go:1.15 -f Dockerfile.go_grpc.1.15 .
# (use -build-arg http_proxy=<> --build-arg https_proxy=<> if needed)
# you need Debian (buster) as Protoc does not work with musl libc, it needs glibc
FROM golang:1.15.3-buster
ENV GO111MODULE on
#https://github.com/golang/protobuf
ENV GO_PB_VER v1.4.3
# https://github.com/golang/protobuf/releases
ENV PROTOC_GEN_GO_VER v1.4.3
# https://github.com/protocolbuffers/protobuf/releases/
ENV PB_VER 3.13.0
# https://github.com/grpc/grpc/releases
ENV GRPC_VER v1.32.0
ENV PB_URL https://github.com/google/protobuf/releases/download/v${PB_VER}/protoc-${PB_VER}-linux-x86_64.zip
RUN apt-get update && apt-get install -y --no-install-recommends unzip && mkdir -p /tmp/protoc && \
curl -L ${PB_URL} > /tmp/protoc/protoc.zip && \
cd /tmp/protoc && \
unzip protoc.zip && \
cp /tmp/protoc/bin/protoc /usr/local/bin && \
cp -R /tmp/protoc/include/* /usr/local/include && \
chmod go+rx /usr/local/bin/protoc && \
cd /tmp && \
rm -r /tmp/protoc && \
rm -rf /var/lib/apt/lists/* && \
go get google.golang.org/grpc@${GRPC_VER} && \
go get github.com/golang/protobuf@${GO_PB_VER} && \
go get github.com/golang/protobuf/protoc-gen-go@${PROTOC_GEN_GO_VER}
Content type
Image
Digest
sha256:c71eedd12…
Size
380.2 MB
Last updated
about 4 years ago
docker pull alexcpn/grpc-go:1.19