Skip to content

Instantly share code, notes, and snippets.

@remore
Created June 9, 2015 15:29
Show Gist options
  • Save remore/c4ede921bb034e651579 to your computer and use it in GitHub Desktop.
Save remore/c4ede921bb034e651579 to your computer and use it in GitHub Desktop.
A Dockerfile to create grpc-common deployed ubuntu14.04 instance
FROM ubuntu:14.04
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install python-software-properties software-properties-common git-core curl wget gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
RUN add-apt-repository -y ppa:brightbox/ruby-ng
RUN apt-get -y update
RUN apt-get -y install ruby2.1 ruby2.1-dev
#ENV PATH "/root/.rbenv/shims:~/.rbenv/bin:$PATH"
#RUN echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
#RUN type rbenv
#RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
#RUN rbenv install 2.1.0
#RUN rbenv global 2.1.0
RUN git clone https://github.com/grpc/grpc-common.git ~/grpc-common
RUN echo $PATH
RUN gem install bundler
RUN cd ~/grpc-common/ruby; bundle install
# installing php
# RUN apt-get -y install php5 php-pear
# RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
# RUN cd /root/grpc-common/php && composer install
# RUN pear channel-discover pear.pollinimini.net
# RUN pear install drslump/Protobuf-beta
# installing golang
#RUN curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer | bash
#RUN [[ -s "/root/.gvm/scripts/gvm" ]] && source "/root/.gvm/scripts/gvm"
# ENV PATH "/root/.gvm/scripts/gvm:$PATH"
#RUN gvm install go1.4
#RUN gvm use go1.4
RUN wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.4.2.linux-amd64.tar.gz
ENV PATH "/usr/local/go/bin:$PATH"
ENV GOPATH "/root/any-working-dir"
RUN go get -u github.com/grpc/grpc-common/go/greeter_client
RUN go get -u github.com/grpc/grpc-common/go/greeter_server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment