From: subhash kumar singh Date: Fri, 26 Mar 2021 10:23:13 +0000 (+0530) Subject: Fixing Dockerfile X-Git-Tag: 1.0.1~13 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=e363aa9373212833d797ea7d91224b8b65df201d;p=ric-app%2Fhw-go.git Fixing Dockerfile Fixing Dockerfile to build and run hw-go. Signed-off-by: subhash kumar singh Change-Id: I24e164fd2f4e05eb4a5bc84171c8ca4e4cb9c1dc --- diff --git a/Dockerfile b/Dockerfile index 9c3c11e..b7d6e3e 100755 --- a/Dockerfile +++ b/Dockerfile @@ -16,53 +16,17 @@ # #---------------------------------------------------------- -FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as xapp-base -RUN apt-get update -y \ - &&apt-get install -y \ - apt-utils \ - cmake \ - gawk \ - sudo \ - nano \ - jq \ - gettext-base \ - bison \ - flex \ - curl \ - tree +FROM golang:1.15 -RUN curl -s https://packagecloud.io/install/repositories/o-ran-sc/master/script.deb.sh | bash - -# RMR -ARG RMRVERSION=4.2.2 -#RUN apt-get install -y rmr=${RMRVERSION} rmr-dev=${RMRVERSION} +ARG RMRVERSION=4.5.2 RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr_${RMRVERSION}_amd64.deb RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb -RUN rm -f rmr_${RMRVERSION}_amd64.deb rmr-dev_${RMRVERSION}_amd64.deb - -# -RUN ldconfig - -# -ENV PATH="/usr/local/go/bin:${PATH}" - -WORKDIR "/" -CMD ["/bin/bash"] - -#---------------------------------------------------------- -# -#---------------------------------------------------------- -FROM xapp-base as xapp-base-testbuild - - RUN mkdir -p /ws WORKDIR "/ws" COPY . /ws -# Module prepare (if go.mod/go.sum updated) -#COPY go.mod /ws -#COPY go.sum /ws -#RUN go mod download - -#RUN go build hwApp.go +RUN ldconfig +RUN GO111MODULE=on GO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o hw-app hwApp.go +#CMD RMR_SEED_RT=config/uta_rtg.rt ./hw-app -f config/test-config.json +CMD RMR_SEED_RT=config/uta_rtg.rt ./hw-app -f config/config-file.json