summaryrefslogtreecommitdiffstats
path: root/build/Dockerfile
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2020-05-05 21:22:59 -0700
committerEric Multanen <eric.w.multanen@intel.com>2020-06-10 10:08:10 -0700
commit6203e6a8309dcfa4b8f6b6cb0453d2b43dd8ab3f (patch)
tree43c67f4409d882f7e8ff2c18443ef757865bafb9 /build/Dockerfile
parent82ec0fbda9ab2090fea542403221be853332e003 (diff)
Add Dockerfile for v2 Microservices
Dockerfile for building and running microservices. Issue-ID: MULTICLOUD-1065 Signed-off-by: Ritu Sood <ritu.sood@intel.com> Change-Id: I95242d074b1ad1fa446727d849478b041e2f9829
Diffstat (limited to 'build/Dockerfile')
-rw-r--r--build/Dockerfile37
1 files changed, 37 insertions, 0 deletions
diff --git a/build/Dockerfile b/build/Dockerfile
new file mode 100644
index 00000000..ff9e8572
--- /dev/null
+++ b/build/Dockerfile
@@ -0,0 +1,37 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+FROM golang:1.14.1
+
+WORKDIR /go/src/github.com/onap/multicloud-k8s
+COPY ./ ./
+RUN cd src/orchestrator && make all
+RUN cd src/ncm && make all
+RUN cd src/dcm && make all
+RUN cd src/rsync && make all
+RUN cd src/ovnaction && make all
+RUN cd src/clm && make all
+
+FROM ubuntu:16.04
+
+WORKDIR /opt/mco
+RUN groupadd -r mco && useradd -r -g mco mco
+RUN chown mco:mco /opt/mco -R
+COPY --chown=mco --from=0 /go/src/github.com/onap/multicloud-k8s/src/orchestrator/orchestrator ./
+COPY --chown=mco --from=0 /go/src/github.com/onap/multicloud-k8s/src/ncm/ncm ./
+COPY --chown=mco --from=0 /go/src/github.com/onap/multicloud-k8s/src/dcm/dcm ./
+COPY --chown=mco --from=0 /go/src/github.com/onap/multicloud-k8s/src/rsync/rsync ./
+COPY --chown=mco --from=0 /go/src/github.com/onap/multicloud-k8s/src/ovnaction/ovnaction ./
+COPY --chown=mco --from=0 /go/src/github.com/onap/multicloud-k8s/src/clm/clm ./
+COPY --chown=mco --from=0 /go/src/github.com/onap/multicloud-k8s/build/entrypoint ./
+
+USER mco
+
+ENTRYPOINT ["./entrypoint"]
+