Created
September 23, 2016 19:34
-
-
Save vyper/4445a825f0171a0c377821ea50c96e02 to your computer and use it in GitHub Desktop.
Dockerfile to generate protos
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 ruby:2.3.0-alpine | |
ENV PROTOBUF_VERSION 3.0.2 | |
RUN apk add --update build-base autoconf automake libtool git perl && \ | |
curl --location --silent --output /tmp/protobuf.tar.gz https://github.com/google/protobuf/archive/v$PROTOBUF_VERSION.tar.gz && \ | |
tar xfz /tmp/protobuf.tar.gz -C /tmp/ && \ | |
cd /tmp/protobuf-$PROTOBUF_VERSION && \ | |
./autogen.sh && \ | |
./configure --prefix=/usr && \ | |
make -j 3 && \ | |
make check && \ | |
make install && \ | |
rm -rf /tmp/protobuf-$PROTOBUF_VERSION | |
RUN apk add --update libstdc++ | |
RUN mkdir /usr/local/grpc && \ | |
git clone https://github.com/grpc/grpc.git /usr/local/grpc --depth 1 && \ | |
git submodule update --init && \ | |
make grpc_ruby_plugin && \ | |
RUN cd ~ && \ | |
apk del build-base autoconf automake libtool git perl && \ | |
rm -rf /var/cache/apk/* && \ | |
rm -rf /usr/local/grpc && \ | |
rm -rf /usr/local/include | |
RUN mkdir /app | |
WORKDIR /app | |
ADD Gemfile* /app/ | |
RUN bundle install --jobs 20 --retry 5 | |
ADD . /app | |
EXPOSE 8080 | |
# ENTRYPOINT ["bundle", "exec"] | |
# CMD ["bundle", "exec", "ruby", "./server.rb"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment