Dockerfile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. FROM docker.infra.flowdat.com/fd3/sf-php:latest
  2. EXPOSE 8000
  3. ADD . /opt/stats
  4. RUN rm /opt/stats/var/cache/* -rf
  5. RUN cp /opt/stats/app/config/bundles/ik/base-admin-bundle/parameters.yml.dist /opt/stats/app/config/bundles/ik/base-admin-bundle/parameters.yml
  6. WORKDIR /opt/stats
  7. RUN rm -rf /opt/ftth/vendor/*
  8. RUN rm -rf app/config/parameters.yml
  9. RUN rm -rf app/config/bundles/hwi/oauth-bundle/parameters.yml
  10. RUN rm -rf app/config/bundles/ik/webservice-bundle/parameters.yml
  11. RUN cp app/config/parameters.yml.docker app/config/parameters.yml
  12. RUN cp app/config/bundles/hwi/oauth-bundle/parameters.yml.docker app/config/bundles/hwi/oauth-bundle/parameters.yml
  13. RUN cp app/config/bundles/ik/webservice-bundle/parameters.yml.docker app/config/bundles/ik/webservice-bundle/parameters.yml
  14. RUN cp -r keys /opt/keys/
  15. RUN chmod 0600 /opt/keys/*
  16. RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction
  17. RUN cp app/config/parameters.yml.docker app/config/parameters.yml ;\
  18. cp app/config/bundles/hwi/oauth-bundle/parameters.yml.docker app/config/bundles/hwi/oauth-bundle/parameters.yml ;\
  19. cp app/config/bundles/ik/webservice-bundle/parameters.yml.docker app/config/bundles/ik/webservice-bundle/parameters.yml ;\
  20. cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
  21. RUN apt-get update && apt-get install -yq gdal-bin
  22. CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction ;\
  23. rm var/cache/* -rf ;\
  24. composer dump-autoload ;\
  25. composer run-script post-install-cmd --no-interaction ;\
  26. bin/console server:run 0.0.0.0