Created
August 12, 2018 14:30
-
-
Save cubehouse/8c37ceae11fab130f9247f8a5e7cbb2b to your computer and use it in GitHub Desktop.
Build protobuf files for Dart - Docker image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
RUN mkdir /proto | |
WORKDIR /proto | |
RUN apt update && apt install apt-transport-https gnupg2 curl unzip wget -y | |
RUN sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' | |
RUN sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' | |
RUN apt update && apt install dart -y | |
RUN wget https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip | |
RUN unzip protoc-3.6.1-linux-x86_64.zip | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run: