X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=integration_tests%2Ftestxappcode%2FDockerfile-query-receiver;fp=integration_tests%2FDockerfile-query-receiver;h=20fb08231854f5b9fb5d8525571d5953b4d9828f;hb=78ba273b279a7e7af6dba811a29746b881a53a8e;hp=3c5ac28ac565c1ae3122109e8b7426728d2aa3e0;hpb=445221bb8e531d77aad987b936b30d385521134f;p=ric-plt%2Fa1.git diff --git a/integration_tests/Dockerfile-query-receiver b/integration_tests/testxappcode/Dockerfile-query-receiver similarity index 52% rename from integration_tests/Dockerfile-query-receiver rename to integration_tests/testxappcode/Dockerfile-query-receiver index 3c5ac28..20fb082 100644 --- a/integration_tests/Dockerfile-query-receiver +++ b/integration_tests/testxappcode/Dockerfile-query-receiver @@ -1,6 +1,6 @@ # ================================================================================== -# Copyright (c) 2019 Nokia -# Copyright (c) 2018-2019 AT&T Intellectual Property. +# Copyright (c) 2020 Nokia +# Copyright (c) 2020 AT&T Intellectual Property. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,32 +14,33 @@ # See the License for the specific language governing permissions and # limitations under the License. # ================================================================================== -# install a well known working rmr -FROM python:3.7-alpine -RUN apk update && apk add autoconf automake build-base cmake libtool ninja pkgconfig git -RUN git clone --branch 1.10.2 https://gerrit.o-ran-sc.org/r/ric-plt/lib/rmr \ - && cd rmr \ - && mkdir build \ - && cd build \ - && cmake .. -DPACK_EXTERNALS=1 \ - && make install -# stage2 -FROM python:3.7-alpine +# This Dockerfile uses a two stage Docker build -# copies -COPY --from=0 /usr/local/lib64/libnng.so /usr/local/lib64/libnng.so -COPY --from=0 /usr/local/lib64/librmr_nng.so /usr/local/lib64/librmr_nng.so -COPY query_tester.py / +FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:1-rmr1.13.1 -# Install RMr python bindings -RUN pip install --upgrade pip -RUN pip install rmr==2.2.0 +# go will complain if there is a go.mod at the root of the GOPATH so we can't. +RUN mkdir myxapp +COPY receiver.go myxapp/receiver.go +COPY go.mod myxapp/go.mod -# rmr setups +# do the build +WORKDIR myxapp +ENV GO111MODULE on +ENV GO_ENABLED 0 +ENV GOOS linux +RUN go build -a -installsuffix cgo -o receiver receiver.go + +# 2nd stage +FROM alpine:3.11 +COPY --from=0 /usr/local/lib64/libnng.so* /usr/local/lib64/ +COPY --from=0 /usr/local/lib64/librmr_nng* /usr/local/lib64/ +COPY --from=0 /go/myxapp/receiver . +COPY query-config-file.yaml . + +# rmr setup RUN mkdir -p /opt/route/ ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64 ENV RMR_SEED_RT /opt/route/local.rt -WORKDIR / -CMD ["python","-u","query_tester.py"] +CMD ["./receiver", "-f", "query-config-file.yaml"]