X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Dockerfile;h=6457359bc4e5fd19da5b757ddfdfa890b53bfba8;hb=be9f2684de5ed4afbe22f441cb9db5f268d05af3;hp=a78ab2ee8c8bf39a5fb6c71565f3a33e15352e52;hpb=d0f6509e015fb295ae53bdb304b0150be36018e4;p=ric-plt%2Frtmgr.git diff --git a/Dockerfile b/Dockerfile index a78ab2e..6457359 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,32 +29,38 @@ RUN cd /go/bin \ && mv swagger_linux_amd64 swagger \ && chmod +x swagger -COPY . /go/src/routing-manager - WORKDIR /go/src/routing-manager +COPY api/ /go/src/routing-manager/api +COPY LICENSE LICENSE +RUN mkdir pkg RUN git clone "https://gerrit.o-ran-sc.org/r/ric-plt/appmgr" \ - && cp appmgr/api/appmgr_rest_api.json api/ \ + && cp appmgr/api/appmgr_rest_api.yaml api/ \ && rm -rf appmgr RUN swagger generate server -f api/routing_manager.yaml -t pkg/ --exclude-main -r LICENSE -RUN swagger generate client -f api/appmgr_rest_api.json -t pkg/ -m appmgr_model -c appmgr_client -r LICENSE +RUN swagger generate client -f api/appmgr_rest_api.yaml -t pkg/ -m appmgr_model -c appmgr_client -r LICENSE + +COPY glide.lock glide.lock +COPY glide.yaml glide.yaml RUN glide install --strip-vendor -RUN go build cmd/rtmgr.go \ - && cp rtmgr /go/bin/rtmgr \ - && cp run_rtmgr.sh /run_rtmgr.sh +COPY pkg pkg +COPY cmd cmd +COPY run_rtmgr.sh /run_rtmgr.sh + +ENV GOBIN /go/bin +RUN go install ./cmd/rtmgr.go # UT intermediate container FROM rtmgrbuild as rtmgrut RUN go test ./pkg/sbi ./pkg/rpe ./pkg/nbi ./pkg/sdl -cover -race - # Final, executable container FROM ubuntu:16.04 COPY --from=rtmgrbuild /go/bin/rtmgr / COPY --from=rtmgrbuild /run_rtmgr.sh / +RUN apt-get update && apt-get install -y iputils-ping net-tools curl tcpdump RUN mkdir /db && touch /db/rt.json && chmod 777 /db/rt.json RUN chmod 755 /run_rtmgr.sh CMD /run_rtmgr.sh -