Created
April 11, 2018 09:19
-
-
Save pkqk/17f3f3f87d526ec667f0aea9c017164d to your computer and use it in GitHub Desktop.
timestamp/protobuf question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
go: | |
build: . | |
working_dir: /go/src | |
volumes: | |
- .:/go/src | |
command: protoc --go_out=. eg.proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine | |
RUN apk add --no-cache git make protobuf | |
RUN go get github.com/golang/protobuf/protoc-gen-go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
package eg; | |
import "google/protobuf/timestamp.proto"; | |
message Timestamped { | |
google.protobuf.Timestamp stamp = 1; | |
int32 count = 2; | |
} |
Doing an apk add protobuf-dev
will fix this issue.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What should I do to get it to reference the
google.protobuf.Timestamp
definition?Running
protoc --go_out=. eg.proto
current gives this error:I've scanned the entire filesystem of that image and timestamp.proto doesn't exist anywhere on it, does it need other packages and command line arguments