summaryrefslogtreecommitdiffstats
path: root/catalog-be/sdc-backend-init/Dockerfile
diff options
context:
space:
mode:
authork.kedron <k.kedron@partner.samsung.com>2020-03-05 13:12:27 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-06-24 06:01:11 +0000
commitcb30f3a566b73c78c3ea666acfcd3f288098684a (patch)
tree38cd1acb83ddde2b927485611d130bbeec3c1a4b /catalog-be/sdc-backend-init/Dockerfile
parentbdbfc2e460ccb561c3e174260b2908b974996d4f (diff)
Refactoring the sdc-BE-init python scripts
Deeper refactoring of python script: - create the python package with init script - support for python 3.x - reuse code - new design - support for .json conf file - update the docker chef script Issue-ID: SDC-2784 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I02169eb7d0e3e90851ba1811536d1712c3b4145f
Diffstat (limited to 'catalog-be/sdc-backend-init/Dockerfile')
-rw-r--r--catalog-be/sdc-backend-init/Dockerfile23
1 files changed, 17 insertions, 6 deletions
diff --git a/catalog-be/sdc-backend-init/Dockerfile b/catalog-be/sdc-backend-init/Dockerfile
index cb26610859..3ffcbe691a 100644
--- a/catalog-be/sdc-backend-init/Dockerfile
+++ b/catalog-be/sdc-backend-init/Dockerfile
@@ -1,11 +1,22 @@
-FROM onap/base_sdc-python:1.6.0-SNAPSHOT-latest
+FROM onap/base_sdc-python:1.7.0
-COPY --chown=sdc:sdc chef-solo /home/sdc/chef-solo/
+# user/group args are inherited from base_sdc-python base image
+COPY --chown=$user:$group scripts /home/$user/scripts
-COPY --chown=sdc:sdc chef-repo/cookbooks /home/sdc/chef-solo/cookbooks/
+RUN chmod 770 -R /home/$user/scripts && \
+ cd /home/$user/scripts && \
+ python setup.py install --user
-COPY --chown=sdc:sdc startup.sh /home/sdc/
+ENV PATH=$PATH:/home/$user/.local/bin
-RUN chmod 770 /home/sdc/startup.sh
+COPY --chown=$user:$group chef-solo /home/$user/chef-solo/
-ENTRYPOINT [ "/home/sdc/startup.sh" ]
+COPY --chown=$user:$group chef-repo/cookbooks /home/$user/chef-solo/cookbooks/
+
+COPY --chown=$user:$group startup.sh /home/$user/
+
+RUN chmod 770 /home/$user/startup.sh
+
+WORKDIR /home/$user/
+
+ENTRYPOINT /home/${user}/startup.sh