aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Tim Emiola <temiola@google.com>2015-01-21 09:51:45 -0800
committerGravatar Tim Emiola <temiola@google.com>2015-01-21 09:51:45 -0800
commitd2130c356170f8b01ccabc63d404a3a4a23d87bb (patch)
tree1cc87408a4a729e373996f50d6910c4e650b3297
parenta36b84ca652681d7dad45c44978ae7d014f5696b (diff)
Switches the grpc-repo dockerfiles to pull gRPC source from GitHub
-rw-r--r--tools/dockerfile/grpc_base/Dockerfile25
-rw-r--r--tools/dockerfile/grpc_cxx/Dockerfile19
-rw-r--r--tools/dockerfile/grpc_php/Dockerfile5
-rw-r--r--tools/dockerfile/grpc_php_base/Dockerfile20
-rw-r--r--tools/dockerfile/grpc_ruby/Dockerfile9
-rw-r--r--tools/dockerfile/grpc_ruby_base/Dockerfile26
6 files changed, 50 insertions, 54 deletions
diff --git a/tools/dockerfile/grpc_base/Dockerfile b/tools/dockerfile/grpc_base/Dockerfile
index 45be172593..be1b69b0dc 100644
--- a/tools/dockerfile/grpc_base/Dockerfile
+++ b/tools/dockerfile/grpc_base/Dockerfile
@@ -13,6 +13,7 @@ RUN apt-get update && apt-get install -y \
libc6 \
libc6-dbg \
libc6-dev \
+ libgtest-dev \
libtool \
make \
strace \
@@ -34,23 +35,13 @@ ENV CLOUD_SDK /google-cloud-sdk
RUN $CLOUD_SDK/install.sh --usage-reporting=true --path-update=true --bash-completion=true --rc-path=/.bashrc --disable-installation-options
ENV PATH $CLOUD_SDK/bin:$PATH
-# Install gcompute-tools to allow access to private git-on-borg repos
-RUN git clone https://gerrit.googlesource.com/gcompute-tools /var/local/git/gcompute-tools
-
-# Start the daemon that allows access to private git-on-borg repos
-RUN /var/local/git/gcompute-tools/git-cookie-authdaemon
-
-# Install the grpc-tools scripts dir from git
-RUN git clone https://team.googlesource.com/one-platform-grpc-team/grpc-tools /var/local/git/grpc-tools
-
-# Install the grpc-protobuf dir that has the protoc patch
-RUN git clone https://team.googlesource.com/one-platform-grpc-team/protobuf /var/local/git/protobuf
-
-# Install the patched version of protoc
-RUN cd /var/local/git/protobuf && \
- ./autogen.sh && \
- ./configure --prefix=/usr && \
- make && make check && make install && make clean
+# Install a GitHub SSH service credential that gives access to the GitHub repo while it's private
+# TODO: remove this once the repo is public
+ADD .ssh .ssh
+RUN chmod 600 .ssh/github.rsa
+RUN mkdir -p $HOME/.ssh && echo 'Host github.com' > $HOME/.ssh/config
+RUN echo " IdentityFile /.ssh/github.rsa" >> $HOME/.ssh/config
+RUN echo 'StrictHostKeyChecking no' >> $HOME/.ssh/config
# Define the default command.
CMD ["bash"]
diff --git a/tools/dockerfile/grpc_cxx/Dockerfile b/tools/dockerfile/grpc_cxx/Dockerfile
index cf38e976b1..ea3a1dba8f 100644
--- a/tools/dockerfile/grpc_cxx/Dockerfile
+++ b/tools/dockerfile/grpc_cxx/Dockerfile
@@ -1,15 +1,18 @@
# Dockerfile for gRPC C++
FROM grpc/base
-# Start the daemon that allows access to the protected git-on-borg repos
-RUN /var/local/git/gcompute-tools/git-cookie-authdaemon
-
-RUN git clone https://team.googlesource.com/one-platform-grpc-team/grpc /var/local/git/grpc
-RUN cd /var/local/git/grpc \
- && git pull --recurse-submodules \
- && git submodule update --init --recursive
+# Get the source from GitHub
+RUN git clone git@github.com:google/grpc.git /var/local/git/grpc
+RUN cd /var/local/git/grpc && \
+ git pull --recurse-submodules && \
+ git submodule update --init --recursive
+# Build the protobuf library; then the C core.
+RUN cd /var/local/git/grpc/third_party/protobuf && \
+ ./autogen.sh && \
+ ./configure --prefix=/usr && \
+ make -j12 && make check && make install && make clean
RUN make install -C /var/local/git/grpc
# Define the default command.
-CMD ["bash"] \ No newline at end of file
+CMD ["bash"]
diff --git a/tools/dockerfile/grpc_php/Dockerfile b/tools/dockerfile/grpc_php/Dockerfile
index 0e50af70a2..177587669c 100644
--- a/tools/dockerfile/grpc_php/Dockerfile
+++ b/tools/dockerfile/grpc_php/Dockerfile
@@ -1,9 +1,6 @@
# Dockerfile for gRPC PHP
FROM grpc/php_base
-# Start the daemon that allows access to the protected git-on-borg repos
-RUN /var/local/git/gcompute-tools/git-cookie-authdaemon
-
RUN cd /var/local/git/grpc \
&& git pull --recurse-submodules \
&& git submodule update --init --recursive
@@ -15,4 +12,4 @@ RUN cd /var/local/git/grpc/src/php/ext/grpc && git pull && phpize
# Build the grpc PHP extension
RUN cd /var/local/git/grpc/src/php/ext/grpc \
&& ./configure \
- && make \ No newline at end of file
+ && make
diff --git a/tools/dockerfile/grpc_php_base/Dockerfile b/tools/dockerfile/grpc_php_base/Dockerfile
index 8ec90f48b8..47266a310e 100644
--- a/tools/dockerfile/grpc_php_base/Dockerfile
+++ b/tools/dockerfile/grpc_php_base/Dockerfile
@@ -43,9 +43,10 @@ RUN cd /var/local \
&& tar -xf php-5.5.17.tar.gz \
&& cd php-5.5.17 \
&& ./configure --with-zlib=/usr --with-libxml-dir=ext/libxml \
- && make && make install
+ && make -j12 && make install
# Start the daemon that allows access to the protected git-on-borg repos
+RUN git clone https://gerrit.googlesource.com/gcompute-tools /var/local/git/gcompute-tools
RUN /var/local/git/gcompute-tools/git-cookie-authdaemon
# Download the patched PHP protobuf so that PHP gRPC clients can be generated
@@ -64,6 +65,18 @@ ENV PATH /usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/s
# rake: a ruby version of make used to build the PHP Protobuf extension
RUN rvm all do gem install ronn rake
+# Get the source from GitHub, this gets the protobuf library as well
+RUN git clone git@github.com:google/grpc.git /var/local/git/grpc
+RUN cd /var/local/git/grpc && \
+ git pull --recurse-submodules && \
+ git submodule update --init --recursive
+
+# Build and install the protobuf library
+RUN cd /var/local/git/grpc/third_party/protobuf && \
+ ./autogen.sh && \
+ ./configure --prefix=/usr && \
+ make -j12 && make check && make install && make clean
+
# Install the patched PHP protobuf so that PHP gRPC clients can be generated
# from proto3 schemas.
RUN cd /var/local/git/protobuf-php \
@@ -75,10 +88,7 @@ RUN wget https://phar.phpunit.de/phpunit.phar \
&& chmod +x phpunit.phar \
&& mv phpunit.phar /usr/local/bin/phpunit
-RUN git clone https://team.googlesource.com/one-platform-grpc-team/grpc /var/local/git/grpc
-RUN cd /var/local/git/grpc \
- && git submodule update --init --recursive
-
+# Build the C core
RUN make static_c shared_c -j12 -C /var/local/git/grpc
# Define the default command.
diff --git a/tools/dockerfile/grpc_ruby/Dockerfile b/tools/dockerfile/grpc_ruby/Dockerfile
index 9aa34bfcc9..43ec0183ca 100644
--- a/tools/dockerfile/grpc_ruby/Dockerfile
+++ b/tools/dockerfile/grpc_ruby/Dockerfile
@@ -1,19 +1,14 @@
# Dockerfile for gRPC Ruby
FROM grpc/ruby_base
-# Start the daemon that allows access to the protected git-on-borg repos
-RUN /var/local/git/gcompute-tools/git-cookie-authdaemon
-
+# Build the C libary
RUN cd /var/local/git/grpc \
&& git pull --recurse-submodules \
&& git submodule update --init --recursive
+# Build the C core.
RUN make install_c -C /var/local/git/grpc
-# Install the grpc gem locally with its dependencies and build the extension.
-RUN /bin/bash -l -c 'cd /var/local/git/beefcake && bundle && gem build beefcake.gemspec && gem install beefcake'
-RUN /bin/bash -l -c 'cd /var/local/git/grpc/src/ruby && bundle && rake compile:grpc && gem build grpc.gemspec && gem install grpc'
-
# TODO add a command to run the unittest tests when the bug below is fixed
# - the tests fail due to an error in the C threading library:
# they fail with 'ruby: __pthread_mutex_cond_lock_adjust for unknown reasons' at the end of a testcase
diff --git a/tools/dockerfile/grpc_ruby_base/Dockerfile b/tools/dockerfile/grpc_ruby_base/Dockerfile
index ad14e43ec7..b2af9d7160 100644
--- a/tools/dockerfile/grpc_ruby_base/Dockerfile
+++ b/tools/dockerfile/grpc_ruby_base/Dockerfile
@@ -31,15 +31,6 @@ RUN apt-get update && apt-get install -y \
sqlite3 \
zlib1g-dev
-
-# Start the daemon that allows access to the protected git-on-borg repos
-RUN /var/local/git/gcompute-tools/git-cookie-authdaemon
-
-# Download the patched Ruby protobuf (beefcake) so that Ruby gRPC clients can
-# be generated from proto3 schemas.
-RUN git clone https://team.googlesource.com/one-platform-grpc-team/grpc-ruby-beefcake \
- /var/local/git/beefcake
-
# Install RVM, use this to install ruby
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 # Needed for RVM
RUN /bin/bash -l -c "curl -L get.rvm.io | bash -s stable"
@@ -52,8 +43,17 @@ RUN /bin/bash -l -c "echo 'source /home/grpc_ruby/.rvm/scripts/rvm' >> ~/.bashrc
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
-RUN git clone https://team.googlesource.com/one-platform-grpc-team/grpc /var/local/git/grpc
-RUN cd /var/local/git/grpc \
- && git submodule update --init --recursive
+# Get the source from GitHub
+RUN git clone git@github.com:google/grpc.git /var/local/git/grpc
+RUN cd /var/local/git/grpc && \
+ git pull --recurse-submodules && \
+ git submodule update --init --recursive
+
+# Build and install the protobuf library
+RUN cd /var/local/git/grpc/third_party/protobuf && \
+ ./autogen.sh && \
+ ./configure --prefix=/usr && \
+ make -j12 && make check && make install && make clean
-RUN make static_c shared_c -C /var/local/git/grpc \ No newline at end of file
+# Build the C core
+RUN make static_c shared_c -j12 -C /var/local/git/grpc