Skip to content

Instantly share code, notes, and snippets.

@vyper
Created September 23, 2016 19:34
Show Gist options
  • Select an option

  • Save vyper/4445a825f0171a0c377821ea50c96e02 to your computer and use it in GitHub Desktop.

Select an option

Save vyper/4445a825f0171a0c377821ea50c96e02 to your computer and use it in GitHub Desktop.

Revisions

  1. vyper revised this gist Sep 23, 2016. No changes.
  2. vyper created this gist Sep 23, 2016.
    39 changes: 39 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    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"]