From 79f8028941e1d02ee6f626b9f6fa419b90a131cb Mon Sep 17 00:00:00 2001 From: sam bacha Date: Thu, 25 Feb 2021 04:27:45 -0800 Subject: [PATCH] Create Dockerfile --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5ce220c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM golang:1.16.0 + +ENV PROTOC_VERSION=3.12.3 + +RUN apt-get update && apt-get install unzip + +RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + unzip -o protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local bin/protoc && \ + unzip -o protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local include/* && \ + rm -rf protoc-${PROTOC_VERSION}-linux-x86_64.zip + +RUN go get -u google.golang.org/protobuf/cmd/protoc-gen-go && \ + go get github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema + +RUN mkdir /workdir +WORKDIR /workdir + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"]