1 Star 0 Fork 0

xiaofengwuy/protoc-gen-validate

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.73 KB
一键复制 编辑 原始数据 按行查看 历史
Keith Smiley 提交于 2019-05-21 11:55 . Update protoc-gen-go (#200)
FROM ubuntu:xenial
# apt packages
ENV INSTALL_DEPS \
bazel \
ca-certificates \
git \
make \
software-properties-common \
unzip \
wget \
maven \
patch
RUN apt-get update \
&& apt-get install -y -q --no-install-recommends curl openjdk-8-jdk \
&& echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
&& curl https://bazel.build/bazel-release.pub.gpg | apt-key add - \
&& apt-get update \
&& apt-get install -y -q --no-install-recommends ${INSTALL_DEPS} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# protoc
ENV PROTOC_VER=3.6.1
ENV PROTOC_REL=protoc-"${PROTOC_VER}"-linux-x86_64.zip
RUN wget https://github.com/google/protobuf/releases/download/v"${PROTOC_VER}/${PROTOC_REL}" \
&& unzip ${PROTOC_REL} -d protoc \
&& mv protoc /usr/local \
&& ln -s /usr/local/protoc/bin/protoc /usr/local/bin
# go
ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
ENV GORELEASE go1.10.3.linux-amd64.tar.gz
RUN wget -q https://storage.googleapis.com/golang/$GORELEASE \
&& tar -C $(dirname $GOROOT) -xzf $GORELEASE \
&& rm $GORELEASE \
&& mkdir -p $GOPATH/{src,bin,pkg}
# protoc-gen-go
ENV PGG_PKG "github.com/golang/protobuf/protoc-gen-go"
ENV PGG_PATH "${GOPATH}/src/${PGG_PKG}"
ENV PGG_VER=v1.3.1
RUN go get -d ${PGG_PKG} \
&& cd ${PGG_PATH} \
&& git checkout ${PGG_VER} \
&& go install \
&& cd - \
&& rm -rf ${PGG_PATH}
# deps
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
# buildozer
RUN go get github.com/bazelbuild/buildtools/buildozer
WORKDIR ${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate
COPY . .
RUN make build
ENTRYPOINT ["make"]
CMD ["quick"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiaofengwuy/protoc-gen-validate.git
git@gitee.com:xiaofengwuy/protoc-gen-validate.git
xiaofengwuy
protoc-gen-validate
protoc-gen-validate
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385