Add a new API to return the list of undeployed xApps
[ric-plt/appmgr.git] / Dockerfile
old mode 100755 (executable)
new mode 100644 (file)
index b2b314b..db660b9
@@ -16,7 +16,7 @@
 #----------------------------------------------------------
 #
 #----------------------------------------------------------
-FROM ubuntu:16.04 as xapp-base
+FROM ubuntu:16.04 as appmgr-xapp-base
 
 RUN apt-get update -y && \
     apt-get install -y wget
@@ -55,18 +55,8 @@ RUN wget https://dl.google.com/go/go1.12.linux-amd64.tar.gz && \
 
 ENV PATH="/usr/local/go/bin:${PATH}"
 
-#
-# rancodev libs
-#
-RUN mkdir -p /opt/build \
-    && cd /opt/build && git clone https://gerrit.oran-osc.org/r/com/log \
-    && cd log/ ; ./autogen.sh ; ./configure ; make ; make install \
-    && ldconfig
-
-COPY build/build_entrypoint.sh /
 COPY build/user_entrypoint.sh /
 
-RUN chmod +x /build_entrypoint.sh
 RUN chmod +x /user_entrypoint.sh
 
 RUN mkdir -p /ws
@@ -77,14 +67,10 @@ CMD ["/bin/bash"]
 #----------------------------------------------------------
 #
 #----------------------------------------------------------
-FROM xapp-base as appmgr-build
-
-ARG PACKAGEURL
-ARG PACKAGEREPO
-ARG SSH_PRIVATE_KEY
-ARG NETRC_CONFIG
-ARG HELMVERSION
+FROM appmgr-xapp-base as appmgr-build
 
+ARG HELMVERSION=v2.13.0-rc.1
+ARG PACKAGEURL=gerrit.o-ran-sc.org/r/c/ric-plt/appmgr/
 
 #
 # helm
@@ -105,13 +91,12 @@ ENV GOPATH="/go"
 # Module prepare (if go.mod/go.sum updated)
 COPY go.mod /go/src/${PACKAGEURL}
 COPY go.sum /go/src/${PACKAGEURL}
-RUN GO111MODULE=on /build_entrypoint.sh go mod download
+RUN GO111MODULE=on go mod download
 
 # build
 COPY . /go/src/${PACKAGEURL}
-RUN /build_entrypoint.sh make -C /go/src/${PACKAGEURL} build
+RUN make -C /go/src/${PACKAGEURL} build
 
-ENTRYPOINT ["/build_entrypoint.sh"]
 CMD ["/bin/bash"]
 
 
@@ -119,7 +104,7 @@ CMD ["/bin/bash"]
 #
 #----------------------------------------------------------
 FROM appmgr-build as appmgr-test_unit
-ARG PACKAGEURL
+ARG PACKAGEURL=gerrit.o-ran-sc.org/r/c/ric-plt/appmgr/
 WORKDIR "/go/src/${PACKAGEURL}"
 CMD ["make","go-test"]
 
@@ -128,7 +113,7 @@ CMD ["make","go-test"]
 #
 #----------------------------------------------------------
 FROM appmgr-build as appmgr-test_fmt
-ARG PACKAGEURL
+ARG PACKAGEURL=gerrit.o-ran-sc.org/r/c/ric-plt/appmgr/
 WORKDIR "/go/src/${PACKAGEURL}"
 CMD ["make","go-test-fmt"]
 
@@ -136,7 +121,7 @@ CMD ["make","go-test-fmt"]
 #
 #----------------------------------------------------------
 FROM appmgr-build as appmgr-test_sanity
-ARG PACKAGEURL
+ARG PACKAGEURL=gerrit.o-ran-sc.org/r/c/ric-plt/appmgr/
 WORKDIR "/go/src/${PACKAGEURL}"
 CMD ["jq","-s",".", "api/appmgr_rest_api.json"]
 
@@ -145,7 +130,7 @@ CMD ["jq","-s",".", "api/appmgr_rest_api.json"]
 #
 #----------------------------------------------------------
 FROM ubuntu:16.04 as appmgr
-ARG PACKAGEURL
+ARG PACKAGEURL=gerrit.o-ran-sc.org/r/c/ric-plt/appmgr/
 
 RUN apt-get update -y \
     && apt-get install -y sudo openssl ca-certificates ca-cacert \
@@ -168,7 +153,7 @@ RUN ldconfig
 RUN mkdir -p /opt/xAppManager \
     && chmod -R 755 /opt/xAppManager
 
-COPY --from=appmgr-build /go/src/${PACKAGEURL}/build/cache/cmd/appmgr /opt/xAppManager/appmgr
+COPY --from=appmgr-build /go/src/${PACKAGEURL}/cache/go/cmd/appmgr /opt/xAppManager/appmgr
 #COPY --from=appmgr-build /go/src/${PACKAGEURL}/config/appmgr.yaml /opt/etc/xAppManager/config-file.yaml