Dockerfile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. FROM docker.infra.flowdat.com/fd3/sf-php:latest
  2. EXPOSE 8000
  3. ADD . /opt/ftth
  4. WORKDIR /opt/ftth
  5. RUN rm -rf /opt/ftth/vendor/*
  6. RUN rm -f app/config/parameters.yml
  7. RUN rm -f app/config/url_webservice.yml
  8. RUN rm -f app/config/hwioauthbundle/parameters.yml
  9. RUN cp app/config/parameters.yml.docker app/config/parameters.yml
  10. RUN cp app/config/url_webservice.yml.docker app/config/url_webservice.yml
  11. RUN cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml
  12. RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml
  13. RUN rm -rf /opt/ftth/app/config/parameters.yml /opt/ftth/app/config/url_webservice.yml
  14. RUN chmod 0600 /opt/keys/*
  15. RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress
  16. RUN git clone git@bitbucket.org:ikflowdat/extra.git /opt/extra ; cp /opt/extra/netmiko /opt/netmiko ; rm /opt/extra
  17. RUN apt-get install -yq php-soap python-pip
  18. RUN git clone git@bitbucket.org:ikflowdat/extra.git /opt/extra ; cp -r /opt/extra/netmiko /opt/netmiko ; rm /opt/extra
  19. RUN pip install -e /opt/netmiko
  20. RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; git clone git@bitbucket.org:ikflowdat/json-wsdl.git /opt/json-wsdl ; cd /opt/json-wsdl ; composer install --no-scripts --no-interaction --no-progress
  21. RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  22. cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
  23. cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
  24. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  25. cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
  26. CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress;\
  27. rm var/cache/* -rf ;\
  28. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  29. cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
  30. cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
  31. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  32. cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml ;\
  33. composer run-script post-install-cmd --no-interaction ;\
  34. cat app/config/hwioauthbundle/parameters.yml ;\
  35. bin/console server:run 0.0.0.0 --env=dev