Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 3.16 KB

docker.md

File metadata and controls

83 lines (62 loc) · 3.16 KB

Prototool Docker Image

Back to README.md

We provide a Docker image with prototool, protoc, and common Protobuf plugins pre-installed. Most plugins are compressed with UPX. As of this writing, the resulting image is around 58MB. This provides a consistent environment to generate your Protobuf stubs.

Docker Hub

This image is hosted at hub.docker.com/r/uber/prototool.

Usage

Bind your input directory as a volume to /work, and call your command, for example prototool generate:

docker run -v "$(pwd):/work" uber/prototool:latest prototool generate

You can build on top of this image as well if you have custom requirements.

Included

The following libraries are included. This is not meant to be exhaustive - these represent our view of the most commonly-used, stable, maintained libraries. If you think another library should be included, propose it in a GitHub issue and we will evaluate it, however in general we do not want to add additional plugins - our recommendation is to instead build your own image based on uber/prototool that adds plugins you require.

Name Version Binaries
prototool (varies) prototool
protoc 3.6.1 protoc
grpc 1.19.1 grpc_cpp_plugin
grpc_csharp_plugin
grpc_node_plugin
grpc_objective_c_plugin
grpc_php_plugin
grpc_python_plugin
grpc_ruby_plugin
golang/protobuf 1.3.1 protoc-gen-go
gogo/protobuf 1.2.1 protoc-gen-gofast
protoc-gen-gogo
protoc-gen-gogofast
protoc-gen-gogofaster
protoc-gen-gogoslick
grpc-gateway 1.8.5 protoc-gen-grpc-gateway
protoc-gen-swagger
grpc-web 1.0.4 protoc-gen-grpc-web
twirp 5.7.0 protoc-gen-twirp
protoc-gen-twirp_python
yarpc 1.37.3 protoc-gen-yarpc-go

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

Versioning

Images are pushed for every commit to the dev branch as the tags uber/prototool:dev, uber:prototool:latest, and every minor release starting with v1.4.0 has a tag e.g. uber/prototool:1.4.0. Note that as opposed to the rest of Prototool, there is no breaking change guarantee between minor releases - we do not account for breaking changes in libraries we provide within this image, and will update them regularly on dev. We recommend pinning to one of the minor release Docker image tags.

Development

Local development commands:

# build the docker image
make dockerbuild
# test a built docker image
make dockertest
# build and then test
make dockerall

The test files are in etc/docker/testing.

Maintenance

See maintenance.md for maintenance-related information.