Created
January 28, 2019 10:44
-
-
Save patterns/2194fa93d6f29c442907cf77d6ab84cd to your computer and use it in GitHub Desktop.
Generate output from .proto file using container
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 elixir:1.8 | |
ARG ZIPPROTOC=https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip | |
ARG TGZGOLANG=https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz | |
ENV PATH=/root/.mix/escripts:/root/go/bin:/usr/local/go/bin:/usr/local/protoc/bin:$PATH | |
# We need to add golang since base image is now elixir | |
RUN curl -o golang.tar.gz -L $TGZGOLANG ; \ | |
tar -C /usr/local -xzf golang.tar.gz ; \ | |
rm golang.tar.gz ; \ | |
go get -u google.golang.org/grpc ; \ | |
go get -u github.com/golang/protobuf/protoc-gen-go ; \ | |
curl -o protoc.zip -L $ZIPPROTOC ; | |
RUN apt-get update; apt-get -y install unzip ; \ | |
unzip protoc.zip -d /usr/local/protoc ; | |
## rm protoc.zip ; | |
RUN mix local.hex --force ; \ | |
mix local.rebar --force ; \ | |
mix escript.install hex protobuf --force ; \ | |
mix archive.install hex phx_new 1.4.0 --force ; | |
# need to add nodejs for webpack task with phoenix | |
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - ; \ | |
apt-get install -y nodejs ; | |
####RUN npm install -g @vue/cli ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment