blob: ac09e25e404329d4af260233be1a56f4061eae8c [file] [log] [blame]
Craig Tillerab371382015-02-20 15:16:50 -08001# Copyright 2015, Google Inc.
Craig Tiller6ce372c2015-02-20 09:44:12 -08002# 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 Nobleddef2462015-01-06 18:08:25 -080030# Dockerfile for gRPC C++
31FROM grpc/base
32
Donna Dionnef06fd4c2015-01-23 15:59:10 -080033RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev
34
Tim Emiolad2130c32015-01-21 09:51:45 -080035# Get the source from GitHub
Nicolas "Pixel" Noble2f02bb02015-02-28 05:58:22 +010036RUN git clone https://github.com/grpc/grpc.git /var/local/git/grpc
Tim Emiolad2130c32015-01-21 09:51:45 -080037RUN cd /var/local/git/grpc && \
38 git pull --recurse-submodules && \
39 git submodule update --init --recursive
Nicolas Nobleddef2462015-01-06 18:08:25 -080040
Tim Emiolad2130c32015-01-21 09:51:45 -080041# Build the protobuf library; then the C core.
42RUN 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 Nobleddef2462015-01-06 18:08:25 -080046
Donna Dionnef06fd4c2015-01-23 15:59:10 -080047RUN 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 Dionnebdf8c2a2015-01-28 19:26:37 -080053ADD service_account service_account
Yang Gao19882212015-02-05 23:06:54 -080054ADD cacerts cacerts
55ENV GRPC_DEFAULT_SSL_ROOTS_FILE_PATH /cacerts/roots.pem
Donna Dionnebdf8c2a2015-01-28 19:26:37 -080056
Donna Dionnef06fd4c2015-01-23 15:59:10 -080057CMD ["/var/local/git/grpc/bins/opt/interop_server", "--enable_ssl", "--port=8010"]