RIC:1060: Change in PTL
[ric-plt/dbaas.git] / docker / Dockerfile.testapp
1 #   Copyright (c) 2019 AT&T Intellectual Property.
2 #   Copyright (c) 2019 Nokia.
3 #
4 #   Licensed under the Apache License, Version 2.0 (the "License");
5 #   you may not use this file except in compliance with the License.
6 #   You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #   Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #   See the License for the specific language governing permissions and
14 #   limitations under the License.
15
16 #
17 #   This source code is part of the near-RT RIC (RAN Intelligent Controller)
18 #   platform project (RICP).
19 #
20
21 FROM ubuntu:latest
22
23 # Install redis tools & golang & git
24 RUN apt-get update && \
25     apt install -y redis-tools && \
26     apt install -y git && \
27     apt install -y wget && \
28     wget https://golang.org/dl/go1.12.17.linux-amd64.tar.gz && \
29     tar -xvf go1.12.17.linux-amd64.tar.gz && \
30     mv go /usr/local && \
31     apt-get clean
32
33 # Copy sourcefiles
34 COPY ./testapplication ./testapplication
35
36 # Install go testapplication
37 RUN export GOROOT=/usr/local/go && \
38     export PATH=$GOROOT/bin:$PATH && \
39     export GO111MODULE=on && \
40     go get github.com/go-redis/redis && \
41     cd /testapplication/go/ && \
42     go build ./...
43
44 # Keep the container alive
45 ENTRYPOINT ["tail", "-f", "/dev/null"]