Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Update docker dependencies #437

Merged
merged 2 commits into from
Apr 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,22 @@ RUN curl -sSL \
-o /usr/local/bin/protoc-gen-grpc-web && \
chmod +x /usr/local/bin/protoc-gen-grpc-web

ENV YARPC_VERSION=1.37.1
ENV YARPC_VERSION=1.37.2
RUN git clone --depth 1 -b v${YARPC_VERSION} https://github.com/yarpc/yarpc-go.git /go/src/go.uber.org/yarpc && \
cd /go/src/go.uber.org/yarpc && \
GO111MODULE=on go mod init && \
GO111MODULE=on go install ./encoding/protobuf/protoc-gen-yarpc-go && \
mv /go/bin/protoc-gen-yarpc-go /usr/local/bin/

ENV TWIRP_VERSION=5.5.2
RUN git clone --depth 1 -b v${TWIRP_VERSION} https://github.com/twitchtv/twirp.git /go/src/github.com/twitchtv/twirp && \
cd /go/src/github.com/twitchtv/twirp && \
go install ./protoc-gen-twirp ./protoc-gen-twirp_python && \
mv /go/bin/protoc-gen-twirp* /usr/local/bin/
ENV TWIRP_VERSION=5.7.0
RUN curl -sSL \
https://github.com/twitchtv/twirp/releases/download/v${TWIRP_VERSION}/protoc-gen-twirp-Linux-x86_64 \
-o /usr/local/bin/protoc-gen-twirp && \
curl -sSL \
https://github.com/twitchtv/twirp/releases/download/v${TWIRP_VERSION}/protoc-gen-twirp_python-Linux-x86_64 \
-o /usr/local/bin/protoc-gen-twirp_python && \
chmod +x /usr/local/bin/protoc-gen-twirp && \
chmod +x /usr/local/bin/protoc-gen-twirp_python

ENV PROTOBUF_VERSION=3.6.1
RUN mkdir -p /tmp/protoc && \
Expand Down Expand Up @@ -86,5 +90,5 @@ ENV GOGO_PROTOBUF_VERSION=1.2.1 \
GOLANG_PROTOBUF_VERSION=1.3.1 \
GRPC_GATEWAY_VERSION=1.8.5 \
GRPC_WEB_VERSION=1.0.4 \
TWIRP_VERSION=5.5.2 \
YARPC_VERSION=1.37.1
TWIRP_VERSION=5.7.0 \
YARPC_VERSION=1.37.2
2 changes: 2 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ of `protoc`. Note that `etc/config/example/prototool.yaml` is automatically upda
update `DefaultProtocVersion` in `internal/vars/vars.go` and you run `make generate`.

See https://github.com/uber/prototool/pull/418 for an example of updating versions of dependencies.

See https://github.com/uber/prototool/pull/437 for an example of updating versions for Docker.
6 changes: 4 additions & 2 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ commonly-used, stable, maintained libraries.
| [gogo/protobuf] | 1.2.1 | protoc-gen-gofast<br>protoc-gen-gogo<br>protoc-gen-gogofast<br>protoc-gen-gogofaster<br>protoc-gen-gogoslick |
| [grpc-gateway] | 1.8.5 | protoc-gen-grpc-gateway<br>protoc-gen-swagger |
| [grpc-web] | 1.0.4 | protoc-gen-grpc-web |
| [twirp] | 5.5.2 | protoc-gen-twirp<br>protoc-gen-twirp_python |
| [yarpc] | 1.37.1 | protoc-gen-yarpc-go |
| [twirp] | 5.7.0 | protoc-gen-twirp<br>protoc-gen-twirp_python |
| [yarpc] | 1.37.2 | protoc-gen-yarpc-go |

The Well-Known Types are copied to `/usr/include`. The packages `bash`, `curl`, and `git` are also installed.

Expand All @@ -59,6 +59,8 @@ Note that for version changes, the versions are copied in four places: once for
Dockerfile (sharing these is harder than you think), once in [etc/docker/testing/bin/test.sh](../etc/docker/testing/bin/test.sh),
and once in this documentation.

See https://github.com/uber/prototool/pull/437 for an example of updating versions.

Updates of `protobuf` and `grpc` must match the current versions for `alpine:edge` for now. See [here](https://pkgs.alpinelinux.org/packages?name=protobuf&branch=edge&repo=main&arch=x86_64) and [here](https://pkgs.alpinelinux.org/packages?name=grpc&branch=edge&repo=testing&arch=x86_64) for the current versions.

Local development commands:
Expand Down
4 changes: 2 additions & 2 deletions etc/docker/testing/bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ check_env GRPC_VERSION 1.19.1
check_env GRPC_GATEWAY_VERSION 1.8.5
check_env GRPC_WEB_VERSION 1.0.4
check_env PROTOBUF_VERSION 3.6.1
check_env TWIRP_VERSION 5.5.2
check_env YARPC_VERSION 1.37.1
check_env TWIRP_VERSION 5.7.0
check_env YARPC_VERSION 1.37.2
check_env PROTOTOOL_PROTOC_BIN_PATH /usr/bin/protoc
check_env PROTOTOOL_PROTOC_WKT_PATH /usr/include
check_command_output "libprotoc 3.6.1" protoc --version
Expand Down