1e88a62225338a6cf2fd5c2146e6588991bbfa77
[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://dl.google.com/go/go1.11.4.linux-amd64.tar.gz && \
29     tar -xvf go1.11.4.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 GOPATH=$HOME/Projects/Proj1 && \
39     export PATH=$GOPATH/bin:$GOROOT/bin:$PATH && \
40     go get github.com/go-redis/redis && \
41     go build /testapplication/go/testapp.go
42
43 # Keep the container alive
44 ENTRYPOINT ["tail", "-f", "/dev/null"]