Dockerfile 1.4 KB

1234567891011121314151617181920212223242526272829303132
  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. WORKDIR /opt/stats
  6. RUN rm -rf /opt/ftth/vendor/*
  7. RUN rm -rf app/config/parameters.yml
  8. RUN rm -rf app/config/bundles/hwi/oauth-bundle/parameters.yml
  9. RUN rm -rf app/config/bundles/ik/webservice-bundle/parameters.yml
  10. RUN cp app/config/parameters.yml.docker app/config/parameters.yml
  11. RUN cp app/config/bundles/hwi/oauth-bundle/parameters.yml.docker app/config/bundles/hwi/oauth-bundle/parameters.yml
  12. RUN cp app/config/bundles/ik/webservice-bundle/parameters.yml.docker app/config/bundles/ik/webservice-bundle/parameters.yml
  13. RUN cp -r keys /opt/keys/
  14. RUN chmod 0600 /opt/keys/*
  15. RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction
  16. CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction ;\
  17. rm var/cache/* -rf ;\
  18. cp app/config/parameters.yml.docker app/config/parameters.yml ;\
  19. cp app/config/bundles/hwi/oauth-bundle/parameters.yml.docker app/config/bundles/hwi/oauth-bundle/parameters.yml ;\
  20. cp app/config/bundles/ik/webservice-bundle/parameters.yml.docker app/config/bundles/ik/webservice-bundle/parameters.yml ;\
  21. composer dump-autoload ;\
  22. composer run-script symfony-scripts --no-interaction ;\
  23. bin/console server:run 0.0.0.0