DEV Community

loading...

How can I Dockerize Protobuf ?

WizDwarf
・1 min read

First of all after lot of research i found a way how you can do this ? Unfortunately, I tried & got error which i share later.

Structure of App:
---App
---proto
----protofile

Dockfile
FROM golang:1.16

WORKDIR /app

RUN apt-get update
RUN apt install -y protobuf-compiler

RUN GO111MODULE=on \
go get google.golang.org/protobuf/cmd/protoc-gen-go@latest \
google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

RUN mkdir /api

cmd : protoc --proto_path=/api --go_out=/pb --go-grpc_out=/pb /api/x.proto
No File Directory x found
How can I solve

Discussion (0)