Pip install seems to fail in Dockerfile. Instead, move pip installs to
a startup script so that they can be done on initial container startup.
Change-Id: I3125307d5f9bfc980d8f9ed0bba108a5536548fd
Issue-ID: SDNC-288
Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
Former-commit-id:
3c48ffbeda720569fbfb8fac3e5db1cd0551474b
# Base ubuntu with added packages needed for open ecomp
# Base ubuntu with added packages needed for open ecomp
-#FROM onap/ccsdk-ubuntu-image:${ccsdk.distribution.version}
-FROM onap/ccsdk-ubuntu-image:0.2.1-SNAPSHOT
+FROM onap/ccsdk-ubuntu-image:${ccsdk.distribution.version}
LABEL maintainer="SDN-C Team (sdnc@lists.openecomp.org)"
LABEL maintainer="SDN-C Team (sdnc@lists.openecomp.org)"
##Python:
RUN apt-get -y install python2.7
RUN apt-get -y install python-pip
##Python:
RUN apt-get -y install python2.7
RUN apt-get -y install python-pip
-RUN pip install PyMySQL
-RUN pip install cherrypy
-RUN pip install requests
##Ansible:
RUN apt-get -y install software-properties-common
##Ansible:
RUN apt-get -y install software-properties-common
-ENTRYPOINT exec python RestServer.py > RestServer.out
+ENTRYPOINT exec startAnsibleServer.sh
#CMD ["/bin/bash"]
EXPOSE 8000
#CMD ["/bin/bash"]
EXPOSE 8000
--- /dev/null
+#/bin/bash
+
+if [ ! -d /tmp/.ansible-server-installed]
+then
+ pip install PyMySQL
+ pip install cherrypy
+ pip install requests
+ date > /tmp/.ansible-server-installed 2>&1
+fi
+
+cd /opt/onap/sdnc
+exec python RestServer.py > RestServer.out
\ No newline at end of file