Craig Tiller | ab37138 | 2015-02-20 15:16:50 -0800 | [diff] [blame] | 1 | # Copyright 2015, Google Inc. |
Craig Tiller | 6ce372c | 2015-02-20 09:44:12 -0800 | [diff] [blame] | 2 | # All rights reserved. |
| 3 | # |
| 4 | # Redistribution and use in source and binary forms, with or without |
| 5 | # modification, are permitted provided that the following conditions are |
| 6 | # met: |
| 7 | # |
| 8 | # * Redistributions of source code must retain the above copyright |
| 9 | # notice, this list of conditions and the following disclaimer. |
| 10 | # * Redistributions in binary form must reproduce the above |
| 11 | # copyright notice, this list of conditions and the following disclaimer |
| 12 | # in the documentation and/or other materials provided with the |
| 13 | # distribution. |
| 14 | # * Neither the name of Google Inc. nor the names of its |
| 15 | # contributors may be used to endorse or promote products derived from |
| 16 | # this software without specific prior written permission. |
| 17 | # |
| 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | |
Nicolas Noble | ddef246 | 2015-01-06 18:08:25 -0800 | [diff] [blame] | 30 | # Dockerfile for gRPC C++ |
| 31 | FROM grpc/base |
| 32 | |
Donna Dionne | f06fd4c | 2015-01-23 15:59:10 -0800 | [diff] [blame] | 33 | RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev |
| 34 | |
Tim Emiola | d2130c3 | 2015-01-21 09:51:45 -0800 | [diff] [blame] | 35 | # Get the source from GitHub |
Nicolas "Pixel" Noble | 2f02bb0 | 2015-02-28 05:58:22 +0100 | [diff] [blame] | 36 | RUN git clone https://github.com/grpc/grpc.git /var/local/git/grpc |
Tim Emiola | d2130c3 | 2015-01-21 09:51:45 -0800 | [diff] [blame] | 37 | RUN cd /var/local/git/grpc && \ |
| 38 | git pull --recurse-submodules && \ |
| 39 | git submodule update --init --recursive |
Nicolas Noble | ddef246 | 2015-01-06 18:08:25 -0800 | [diff] [blame] | 40 | |
Tim Emiola | d2130c3 | 2015-01-21 09:51:45 -0800 | [diff] [blame] | 41 | # Build the protobuf library; then the C core. |
| 42 | RUN cd /var/local/git/grpc/third_party/protobuf && \ |
| 43 | ./autogen.sh && \ |
| 44 | ./configure --prefix=/usr && \ |
| 45 | make -j12 && make check && make install && make clean |
Nicolas Noble | ddef246 | 2015-01-06 18:08:25 -0800 | [diff] [blame] | 46 | |
Donna Dionne | f06fd4c | 2015-01-23 15:59:10 -0800 | [diff] [blame] | 47 | RUN cd /var/local/git/grpc && ls \ |
| 48 | && make clean \ |
| 49 | && make gens/test/cpp/util/messages.pb.cc \ |
| 50 | && make interop_client \ |
| 51 | && make interop_server |
| 52 | |
Donna Dionne | bdf8c2a | 2015-01-28 19:26:37 -0800 | [diff] [blame] | 53 | ADD service_account service_account |
Yang Gao | 1988221 | 2015-02-05 23:06:54 -0800 | [diff] [blame] | 54 | ADD cacerts cacerts |
| 55 | ENV GRPC_DEFAULT_SSL_ROOTS_FILE_PATH /cacerts/roots.pem |
Donna Dionne | bdf8c2a | 2015-01-28 19:26:37 -0800 | [diff] [blame] | 56 | |
Donna Dionne | f06fd4c | 2015-01-23 15:59:10 -0800 | [diff] [blame] | 57 | CMD ["/var/local/git/grpc/bins/opt/interop_server", "--enable_ssl", "--port=8010"] |