Dockerfile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 apt-get install -yq php-soap
  17. 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
  18. RUN cp app/config/parameters.yml.docker app/config/parameters.yml ;\
  19. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  20. cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
  21. cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
  22. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml
  23. CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress;\
  24. rm var/cache/* -rf ;\
  25. cp app/config/parameters.yml.docker app/config/parameters.yml ;\
  26. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  27. cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
  28. cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
  29. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  30. composer run-script post-install-cmd --no-interaction ;\
  31. cat app/config/hwioauthbundle/parameters.yml ; bin/console server:run 0.0.0.0