Skip to content

Commit

Permalink
Merge pull request #69 from TheThingsIndustries/feature/update
Browse files Browse the repository at this point in the history
  • Loading branch information
rvolosatovs authored Jan 6, 2021
2 parents 31cfb2d + a08f5f4 commit b9e8e11
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 37 deletions.
21 changes: 12 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ RUN mkdir -p ${GOPATH}/src/github.com/TheThingsIndustries/protoc-gen-gogottn &&
go build -ldflags '-w -s' -o /protoc-gen-gogottn-out/protoc-gen-gogottn . && \
install -Ds /protoc-gen-gogottn-out/protoc-gen-gogottn /out/usr/bin/protoc-gen-gogottn

ARG PROTOC_GEN_GOVALIDATORS_VERSION
RUN mkdir -p ${GOPATH}/src/github.com/mwitkow/go-proto-validators && \
curl -sSL https://api.github.com/repos/mwitkow/go-proto-validators/tarball/v${PROTOC_GEN_GOVALIDATORS_VERSION} | tar xz --strip 1 -C ${GOPATH}/src/github.com/mwitkow/go-proto-validators && \
cd ${GOPATH}/src/github.com/mwitkow/go-proto-validators && \
mkdir /go-proto-validators-out && \
go build -ldflags '-w -s' -o /go-proto-validators-out ./... && \
install -Ds /go-proto-validators-out/protoc-gen-govalidators /out/usr/bin/protoc-gen-govalidators && \
install -D ./validator.proto /out/usr/include/github.com/mwitkow/go-proto-validators/validator.proto

ARG PROTOC_GEN_GQL_VERSION
RUN mkdir -p ${GOPATH}/src/github.com/danielvladco/go-proto-gql && \
curl -sSL https://api.github.com/repos/danielvladco/go-proto-gql/tarball/v${PROTOC_GEN_GQL_VERSION} | tar xz --strip 1 -C ${GOPATH}/src/github.com/danielvladco/go-proto-gql && \
Expand All @@ -136,15 +145,6 @@ RUN mkdir -p ${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate && \
install -Ds /protoc-gen-validate-out/protoc-gen-validate /out/usr/bin/protoc-gen-validate && \
install -D ./validate/validate.proto /out/usr/include/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto

ARG GO_PROTO_VALIDATORS_VERSION
RUN mkdir -p ${GOPATH}/src/github.com/mwitkow/go-proto-validators && \
curl -sSL https://api.github.com/repos/mwitkow/go-proto-validators/tarball/v${GO_PROTO_VALIDATORS_VERSION} | tar xz --strip 1 -C ${GOPATH}/src/github.com/mwitkow/go-proto-validators && \
cd ${GOPATH}/src/github.com/mwitkow/go-proto-validators && \
mkdir /go-proto-validators-out && \
go build -ldflags '-w -s' -o /go-proto-validators-out ./... && \
install -Ds /go-proto-validators-out/protoc-gen-govalidators /out/usr/bin/protoc-gen-govalidators && \
install -D ./validator.proto /out/usr/include/github.com/mwitkow/go-proto-validators/validator.proto

ARG GRPC_GATEWAY_VERSION
RUN mkdir -p ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway && \
curl -sSL https://api.github.com/repos/grpc-ecosystem/grpc-gateway/tarball/v${GRPC_GATEWAY_VERSION} | tar xz --strip 1 -C ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway && \
Expand All @@ -160,6 +160,7 @@ RUN mkdir -p ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway && \
mkdir -p /out/usr/include/google/rpc && \
install -D $(find ./third_party/googleapis/google/rpc -name '*.proto') -t /out/usr/include/google/rpc


FROM rust:${RUST_VERSION}-slim as rust_builder
RUN apt-get update && apt-get install -y musl-tools curl
RUN rustup target add x86_64-unknown-linux-musl
Expand Down Expand Up @@ -195,6 +196,7 @@ RUN mkdir -p /grpc-swift && \
patchelf --set-interpreter /protoc-gen-swift/ld-linux-x86-64.so.2 /protoc-gen-swift/${p}; \
done


FROM google/dart:${DART_VERSION} as dart_builder
RUN apt-get update && apt-get install -y musl-tools curl

Expand All @@ -204,6 +206,7 @@ RUN mkdir -p /dart-protobuf && \
cd /dart-protobuf/protoc_plugin && pub install && dart2native --verbose bin/protoc_plugin.dart -o protoc_plugin && \
install -D /dart-protobuf/protoc_plugin/protoc_plugin /out/usr/bin/protoc-gen-dart


FROM alpine:${ALPINE_VERSION} as packer
RUN apk add --no-cache curl

Expand Down
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ A lightweight `protoc` Docker image.
It started out as https://github.com/znly/docker-protobuf fork, but grew into a stand-alone project.

## What's included:
- https://github.com/ckaznocha/protoc-gen-lint
- https://github.com/danielvladco/go-proto-gql
- https://github.com/dart-lang/protobuf
- https://github.com/envoyproxy/protoc-gen-validate
- https://github.com/mwitkow/go-proto-validators
- https://github.com/gogo/protobuf
- https://github.com/golang/protobuf
- https://github.com/google/protobuf
- https://github.com/grpc-ecosystem/grpc-gateway
- https://github.com/grpc/grpc
- https://github.com/grpc/grpc-go
- https://github.com/grpc/grpc-java
- https://github.com/grpc/grpc-swift
- https://github.com/grpc/grpc-web
- https://github.com/improbable-eng/ts-protoc-gen
- https://github.com/protobuf-c/protobuf-c
- https://github.com/pseudomuto/protoc-gen-doc
- https://github.com/stepancheg/grpc-rust
- https://github.com/stepancheg/rust-protobuf
- https://github.com/TheThingsIndustries/protoc-gen-fieldmask
- https://github.com/TheThingsIndustries/protoc-gen-gogottn
- [ckaznocha/protoc-gen-lint](https://github.com/ckaznocha/protoc-gen-lint)
- [danielvladco/go-proto-gql](https://github.com/danielvladco/go-proto-gql)
- [dart-lang/protobuf](https://github.com/dart-lang/protobuf)
- [envoyproxy/protoc-gen-validate](https://github.com/envoyproxy/protoc-gen-validate)
- [mwitkow/go-proto-validators](https://github.com/mwitkow/go-proto-validators)
- [gogo/protobuf](https://github.com/gogo/protobuf)
- [golang/protobuf](https://github.com/golang/protobuf)
- [google/protobuf](https://github.com/google/protobuf)
- [grpc-ecosystem/grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway)
- [grpc/grpc](https://github.com/grpc/grpc)
- [grpc/grpc-go](https://github.com/grpc/grpc-go)
- [grpc/grpc-java](https://github.com/grpc/grpc-java)
- [grpc/grpc-swift](https://github.com/grpc/grpc-swift)
- [grpc/grpc-web](https://github.com/grpc/grpc-web)
- [improbable-eng/ts-protoc-gen](https://github.com/improbable-eng/ts-protoc-gen)
- [protobuf-c/protobuf-c](https://github.com/protobuf-c/protobuf-c)
- [pseudomuto/protoc-gen-doc](https://github.com/pseudomuto/protoc-gen-doc)
- [stepancheg/grpc-rust](https://github.com/stepancheg/grpc-rust)
- [stepancheg/rust-protobuf](https://github.com/stepancheg/rust-protobuf)
- [TheThingsIndustries/protoc-gen-fieldmask](https://github.com/TheThingsIndustries/protoc-gen-fieldmask)
- [TheThingsIndustries/protoc-gen-gogottn](https://github.com/TheThingsIndustries/protoc-gen-gogottn)

## Supported languages
- C
Expand Down
14 changes: 7 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ docker build \
--build-arg DART_VERSION="${DART_VERSION:-"2.10.4"}" \
--build-arg GO_VERSION="${GO_VERSION:-"1.15.6"}" \
--build-arg GRPC_GATEWAY_VERSION="${GRPC_GATEWAY_VERSION:-"2.0.1"}" \
--build-arg GRPC_JAVA_VERSION="${GRPC_JAVA_VERSION:-"1.34.0"}" \
--build-arg GRPC_JAVA_VERSION="${GRPC_JAVA_VERSION:-"1.34.1"}" \
--build-arg GRPC_RUST_VERSION="${GRPC_RUST_VERSION:-"0.8.2"}" \
--build-arg GRPC_SWIFT_VERSION="${GRPC_SWIFT_VERSION:-"0.9.2"}" \
--build-arg GRPC_VERSION="${GRPC_VERSION:-"1.34.0"}" \
--build-arg GRPC_WEB_VERSION="${GRPC_WEB_VERSION:-"1.2.1"}" \
--build-arg NODE_VERSION="${NODE_VERSION:-"14.15.1"}" \
--build-arg NODE_VERSION="${NODE_VERSION:-"14.15.4"}" \
--build-arg PROTOBUF_C_VERSION="${PROTOBUF_C_VERSION:-"1.3.3"}" \
--build-arg PROTOC_GEN_DOC_VERSION="${PROTOC_GEN_DOC_VERSION:-"1.3.2"}" \
--build-arg PROTOC_GEN_FIELDMASK_VERSION="${PROTOC_GEN_FIELDMASK_VERSION:-"0.4.5"}" \
--build-arg PROTOC_GEN_GO_VERSION="${PROTOC_GEN_GO_VERSION:-"1.4.3"}" \
--build-arg PROTOC_GEN_GO_GRPC_VERSION="${PROTOC_GEN_GO_GRPC_VERSION:-"1.34.0"}" \
--build-arg PROTOC_GEN_GO_VERSION="${PROTOC_GEN_GO_VERSION:-"1.4.3"}" \
--build-arg PROTOC_GEN_GOGO_VERSION="${PROTOC_GEN_GOGO_VERSION:-"1.3.1"}" \
--build-arg PROTOC_GEN_GOGOTTN_VERSION="${PROTOC_GEN_GOGOTTN_VERSION:-"3.0.14"}" \
--build-arg PROTOC_GEN_GOVALIDATORS_VERSION="${PROTOC_GEN_GOVALIDATORS_VERSION:-"0.3.2"}" \
--build-arg PROTOC_GEN_GQL_VERSION="${PROTOC_GEN_GQL_VERSION:-"0.8.0"}" \
--build-arg PROTOC_GEN_LINT_VERSION="${PROTOC_GEN_LINT_VERSION:-"0.2.1"}" \
--build-arg PROTOC_GEN_VALIDATE_VERSION="${PROTOC_GEN_VALIDATE_VERSION:-"0.4.1"}" \
--build-arg GO_PROTO_VALIDATORS_VERSION="${GO_PROTO_VALIDATORS_VERSION:-"0.3.2"}" \
--build-arg RUST_PROTOBUF_VERSION="${RUST_PROTOBUF_VERSION:-"2.18.1"}" \
--build-arg RUST_VERSION="${RUST_VERSION:-"1.48.0"}" \
--build-arg RUST_PROTOBUF_VERSION="${RUST_PROTOBUF_VERSION:-"2.19.0"}" \
--build-arg RUST_VERSION="${RUST_VERSION:-"1.49.0"}" \
--build-arg SWIFT_VERSION="${SWIFT_VERSION:-"5.1.5"}" \
--build-arg TS_PROTOC_GEN_VERSION="${TS_PROTOC_GEN_VERSION:-"0.13.0"}" \
--build-arg TS_PROTOC_GEN_VERSION="${TS_PROTOC_GEN_VERSION:-"0.14.0"}" \
--build-arg UPX_VERSION="${UPX_VERSION:-"3.96"}" \
${@} .
2 changes: 2 additions & 0 deletions check-versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ func main() {
{"protobuf-c", "protobuf-c"},
{"pseudomuto", "protoc-gen-doc"},
{"TheThingsIndustries", "protoc-gen-fieldmask"},
{"grpc", "grpc-go"},
{"golang", "protobuf"},
{"gogo", "protobuf"},
{"TheThingsIndustries", "protoc-gen-gogottn"},
{"mwitkow", "go-proto-validators"},
{"danielvladco", "go-proto-gql"},
{"ckaznocha", "protoc-gen-lint"},
{"envoyproxy", "protoc-gen-validate"},
Expand Down

0 comments on commit b9e8e11

Please sign in to comment.