Skip to content

Instantly share code, notes, and snippets.

@cubehouse cubehouse/Dockerfile
Created Aug 12, 2018

What would you like to do?
Build protobuf files for Dart - Docker image
FROM ubuntu
RUN mkdir /proto
WORKDIR /proto
RUN apt update && apt install apt-transport-https gnupg2 curl unzip wget -y
RUN sh -c 'curl | apt-key add -'
RUN sh -c 'curl > /etc/apt/sources.list.d/dart_stable.list'
RUN apt update && apt install dart -y
RUN wget
RUN unzip
RUN /usr/lib/dart/bin/pub global activate protoc_plugin
CMD cp /in/*.proto . && PATH="$PATH":"$HOME/.pub-cache/bin" ./bin/protoc --dart_out=grpc:/out *.proto

This comment has been minimized.

Copy link
Owner Author

commented Aug 12, 2018


docker build -t protobuffer . && docker run --rm -v /path/to/proto/files/:/in -v /path/to/output/folder/:/out -t protobuffer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.