[VOL-2597]:
- Create Dockerfile for building docker container with prereq software
for building and running openolt agent UT.
Change-Id: I0f7d244d3253953b8bfe96598047be1f9a6c7b7b
diff --git a/docker/Dockerfile.openolt-test b/docker/Dockerfile.openolt-test
new file mode 100644
index 0000000..e25f918
--- /dev/null
+++ b/docker/Dockerfile.openolt-test
@@ -0,0 +1,71 @@
+# Copyright 2020 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM ubuntu:16.04
+
+# Update to have latest images
+RUN apt-get update && apt-get -q -y install \
+ git=1:2.7.4-0ubuntu1.7 \
+ pkg-config=0.29.1-0ubuntu1 \
+ build-essential=12.1ubuntu2 \
+ autoconf=2.69-9 libtool=2.4.6-0.1 \
+ libgflags-dev=2.1.2-3 \
+ clang=1:3.8-33ubuntu3.1 \
+ libc++-dev=3.7.0-1ubuntu0.1 \
+ unzip=6.0-20ubuntu1 \
+ libssl-dev=1.0.2g-1ubuntu4.15 \
+ gawk=1:4.1.3+dfsg-0.1 \
+ debhelper=9.20160115ubuntu3 \
+ dh-systemd=1.29ubuntu4 \
+ init-system-helpers=1.29ubuntu4 \
+ curl=7.47.0-1ubuntu2.14 \
+ cmake=3.5.1-1ubuntu3 \
+ ccache=3.2.4-1 \
+ g++-4.9=4.9.3-13ubuntu2 \
+ wget=1.17.1-1ubuntu1.5 \
+ ca-certificates=20170717~16.04.2 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+
+ARG GRPC_VER
+# Download, compile and install gRPC. Remove the source and build artificats after install.
+RUN cd /tmp && git clone -b $GRPC_VER https://github.com/grpc/grpc /tmp/grpc && \
+ cd /tmp/grpc && git submodule update --init && \
+ cd /tmp/grpc/third_party/protobuf && ./autogen.sh && ./configure && \
+ make && make install && ldconfig && \
+ cd /tmp/grpc && make && make install && ldconfig && \
+ rm -rf /tmp/grpc
+
+ARG GTEST_VER
+# Download compile and install gtest library. Remove the source and build artificats after install.
+RUN cd /tmp && git clone https://github.com/google/googletest.git && \
+ cd /tmp/googletest && git checkout $GTEST_VER && \
+ cd /tmp/googletest && cmake CMakeLists.txt && \
+ make && make install && ldconfig && \
+ rm -rf /tmp/googletest
+
+ARG CMOCK_VER
+# Download and install C-Mock library. Remove the source and build artificats after install.
+RUN cd /tmp && git clone https://github.com/hjagodzinski/C-Mock.git && \
+ cd /tmp/C-Mock && git checkout $CMOCK_VER && \
+ make install && \
+ rm -rf /tmp/C-Mock
+
+ARG GMOCK_GLOBAL_VER
+# Download and install gmock-global library. Remove the source and build artificats after install.
+RUN cd /tmp && git clone https://github.com/apriorit/gmock-global.git && \
+ cd /tmp/gmock-global && git checkout $GMOCK_GLOBAL_VER && \
+ cp -rf /tmp/gmock-global/include/gmock-global /usr/local/include && rm -rf /tmp/gmock-global
+
+WORKDIR /app