1 FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as rcbuild
3 ENV PATH=/opt/go/1.14/bin:$PATH
4 ENV PATH $PATH:/usr/local/bin
9 ENV CFG_FILE /opt/ric/config/config-file.json
12 ARG RMRLIBURL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb
13 ARG RMRDEVURL=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb
14 RUN wget --content-disposition ${RMRLIBURL} && dpkg -i rmr_${RMRVERSION}_amd64.deb
15 RUN wget --content-disposition ${RMRDEVURL} && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb
16 RUN rm -f rmr_${RMRVERSION}_amd64.deb rmr-dev_${RMRVERSION}_amd64.deb
18 ARG XAPPFRAMEVERSION=v0.4.11
19 WORKDIR /go/src/gerrit.o-ran-sc.org/r/ric-plt
20 RUN git clone -b ${XAPPFRAMEVERSION} "https://gerrit.o-ran-sc.org/r/ric-plt/xapp-frame"
21 RUN cd xapp-frame && \
22 GO111MODULE=on go mod vendor -v && \
23 cp -r vendor/* /go/src/ && \
26 WORKDIR /go/src/gerrit.o-ran-sc.org/r/ric-app/rc
33 COPY protocol protocol
34 COPY xapp-descriptor xapp-descriptor
37 RUN go get golang.org/x/net@v0.0.0-20210614182718-04defd469f4e
38 RUN go get google.golang.org/grpc@v1.39.0
40 # "COMPILING E2AP Wrapper"
42 gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \
43 gcc *.o -shared -o libe2apwrapper.so && \
44 cp libe2apwrapper.so /usr/local/lib/ && \
45 mkdir /usr/local/include/e2ap && \
46 cp wrapper.h headers/*.h /usr/local/include/e2ap && \
49 # "COMPILING E2SM Wrapper"
51 gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \
52 gcc *.o -shared -o libe2smwrapper.so && \
53 cp libe2smwrapper.so /usr/local/lib/ && \
54 mkdir /usr/local/include/e2sm && \
55 cp wrapper.h headers/*.h /usr/local/include/e2sm && \
59 RUN go build ./cmd/rc.go && pwd && ls -lat
62 ENV CFG_FILE /opt/ric/config/config-file.json
63 COPY --from=rcbuild /usr/local/lib /usr/local/lib
65 WORKDIR /go/src/gerrit.o-ran-sc.org/r/ric-app/rc
66 COPY --from=rcbuild /go/src/gerrit.o-ran-sc.org/r/ric-app/rc/rc .