blob: 1326df86e1fe06546c0ef245d661baa9cf8afc46 [file] [log] [blame]
Girish Gowdraab4cd692020-02-13 17:36:54 +05301# Copyright 2020 the original author or authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15FROM ubuntu:16.04
16
17# Update to have latest images
18RUN apt-get update && apt-get -q -y install \
Girish Gowdra46aec6c2020-04-26 17:27:37 -070019 git=1:2.7.4-0ubuntu1.9 \
Girish Gowdraab4cd692020-02-13 17:36:54 +053020 pkg-config=0.29.1-0ubuntu1 \
21 build-essential=12.1ubuntu2 \
22 autoconf=2.69-9 libtool=2.4.6-0.1 \
23 libgflags-dev=2.1.2-3 \
24 clang=1:3.8-33ubuntu3.1 \
25 libc++-dev=3.7.0-1ubuntu0.1 \
26 unzip=6.0-20ubuntu1 \
27 libssl-dev=1.0.2g-1ubuntu4.15 \
28 gawk=1:4.1.3+dfsg-0.1 \
29 debhelper=9.20160115ubuntu3 \
30 dh-systemd=1.29ubuntu4 \
31 init-system-helpers=1.29ubuntu4 \
32 curl=7.47.0-1ubuntu2.14 \
33 cmake=3.5.1-1ubuntu3 \
34 ccache=3.2.4-1 \
35 g++-4.9=4.9.3-13ubuntu2 \
36 wget=1.17.1-1ubuntu1.5 \
Girish Gowdra46aec6c2020-04-26 17:27:37 -070037 ca-certificates=20170717~16.04.2 \
38 lcov=1.12-2 && \
Girish Gowdraab4cd692020-02-13 17:36:54 +053039 apt-get clean && \
40 rm -rf /var/lib/apt/lists/*
41
42ARG GRPC_VER
43# Download, compile and install gRPC. Remove the source and build artificats after install.
44RUN cd /tmp && git clone -b $GRPC_VER https://github.com/grpc/grpc /tmp/grpc && \
45 cd /tmp/grpc && git submodule update --init && \
46 cd /tmp/grpc/third_party/protobuf && ./autogen.sh && ./configure && \
47 make && make install && ldconfig && \
48 cd /tmp/grpc && make && make install && ldconfig && \
49 rm -rf /tmp/grpc
50
51ARG GTEST_VER
52# Download compile and install gtest library. Remove the source and build artificats after install.
53RUN cd /tmp && git clone https://github.com/google/googletest.git && \
54 cd /tmp/googletest && git checkout $GTEST_VER && \
55 cd /tmp/googletest && cmake CMakeLists.txt && \
56 make && make install && ldconfig && \
57 rm -rf /tmp/googletest
58
59ARG CMOCK_VER
60# Download and install C-Mock library. Remove the source and build artificats after install.
61RUN cd /tmp && git clone https://github.com/hjagodzinski/C-Mock.git && \
62 cd /tmp/C-Mock && git checkout $CMOCK_VER && \
63 make install && \
64 rm -rf /tmp/C-Mock
65
66ARG GMOCK_GLOBAL_VER
67# Download and install gmock-global library. Remove the source and build artificats after install.
68RUN cd /tmp && git clone https://github.com/apriorit/gmock-global.git && \
69 cd /tmp/gmock-global && git checkout $GMOCK_GLOBAL_VER && \
70 cp -rf /tmp/gmock-global/include/gmock-global /usr/local/include && rm -rf /tmp/gmock-global
71
72WORKDIR /app