+
+ARG RTMGRVERSION=cd7867c8f527f46fd8702b0b8d6b380a8e134bea
+
+RUN git clone "https://gerrit.o-ran-sc.org/r/ric-plt/rtmgr" \
+ && git -C "rtmgr" checkout $RTMGRVERSION \
+ && cp rtmgr/api/routing_manager.yaml api/ \
+ && rm -rf rtmgr
+
+
+RUN mkdir -p /root/go && \
+ swagger generate client -f api/routing_manager.yaml -t pkg/ -m rtmgr_models -c rtmgr_client
+
+
+#
+#
+#
+COPY pkg pkg
+COPY cmd cmd
+
+RUN mkdir -p /opt/bin && \
+ go build -o /opt/bin/submgr cmd/submgr.go && \
+ mkdir -p /opt/build/container/usr/local
+
+
+RUN go mod tidy
+
+# unittest
+COPY test/config-file.json test/config-file.json
+ENV CFG_FILE=/opt/submgr/test/config-file.json
+
+RUN go test -test.coverprofile /tmp/submgr_cover.out -count=1 -v ./pkg/control
+
+#-c -o submgr_test
+#RUN ./submgr_test -test.coverprofile /tmp/submgr_cover.out
+
+RUN go tool cover -html=/tmp/submgr_cover.out -o /tmp/submgr_cover.html
+
+# test formating (not important)
+RUN test -z "$(gofmt -l pkg/control/*.go)"
+RUN test -z "$(gofmt -l pkg/teststub/*.go)"
+RUN test -z "$(gofmt -l pkg/teststubdummy/*.go)"
+RUN test -z "$(gofmt -l pkg/teststube2ap/*.go)"
+RUN test -z "$(gofmt -l pkg/xapptweaks/*.go)"
+
+
+###########################################################
+#
+###########################################################