1 # Copyright (c) 2020 Samsung.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 #----------------------------------------------------------
17 #----------------------------------------------------------
19 FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as build-hw-go
22 RUN apt update && apt install -y iputils-ping net-tools curl sudo ca-certificates
24 # Install RMr shared library & development header files
25 RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_4.7.0_amd64.deb/download.deb && dpkg -i rmr_4.7.0_amd64.deb && rm -rf rmr_4.7.0_amd64.deb
26 RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_4.7.0_amd64.deb/download.deb && dpkg -i rmr-dev_4.7.0_amd64.deb && rm -rf rmr-dev_4.7.0_amd64.deb
28 # Install dependencies, compile and test the module
29 RUN mkdir -p /go/src/hw-go
32 WORKDIR "/go/src/hw-go"
34 ENV GO111MODULE=on GO_ENABLED=0 GOOS=linux
36 RUN go build -a -installsuffix cgo -o hw-go hwApp.go
39 # Final deployment container
42 ENV CFG_FILE=config/config-file.json
43 ENV RMR_SEED_RT=config/uta_rtg.rt
47 COPY --from=build-hw-go /go/src/hw-go/hw-go /
48 COPY --from=build-hw-go /go/src/hw-go/config/* /config/
49 COPY --from=build-hw-go /usr/local/lib /usr/local/lib