aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2019-04-10 16:56:34 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2019-04-10 16:56:37 -0700
commitb5ed6de313d084121925e43ceb09e936ef31d2a3 (patch)
tree6d76b941578653614d5acec6f0c502e9acc4285d
parent932322113184862b906f4b82fe83cfcf3403d021 (diff)
Using the --chown flag to reduce image size
Patch to reduce the size of the docker image for multicloud/k8s image Reduces size by about 300mb Issue-ID: MULTICLOUD-350 Change-Id: I240c57267180c020b659795ea965f5c0877252fc Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
-rw-r--r--deployments/Dockerfile5
1 files changed, 3 insertions, 2 deletions
diff --git a/deployments/Dockerfile b/deployments/Dockerfile
index 961f6766..1dcb5a30 100644
--- a/deployments/Dockerfile
+++ b/deployments/Dockerfile
@@ -31,10 +31,11 @@ RUN apt-get update && apt-get install -y -qq apt-transport-https curl \
&& apt-get update && apt install -y -qq ovn-common
WORKDIR /opt/multicloud/k8s
-ADD ./k8plugin ./
-ADD ./*.so ./
RUN chown onap:onap /opt/multicloud/k8s -R
+ADD --chown=onap ./k8plugin ./
+ADD --chown=onap ./bin/*.so ./
+
USER onap
CMD ["./k8plugin"]