Dockerfile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. FROM docker.infra.flowdat.com/fd3/sf-php:latest
  2. EXPOSE 8000
  3. ADD . /opt/radius
  4. WORKDIR /opt/radius
  5. RUN rm -rf /opt/radius/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/radius/app/config/parameters.yml /opt/radius/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. cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
  24. CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress;\
  25. rm var/cache/* -rf ;\
  26. cp app/config/parameters.yml.docker app/config/parameters.yml ;\
  27. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  28. cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
  29. cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
  30. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  31. cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml ;\
  32. composer run-script post-install-cmd --no-interaction ;\
  33. cat app/config/hwioauthbundle/parameters.yml ;\
  34. php bin/console server:run 0.0.0.0 --env=dev