Dockerfile 1.6 KB

123456789101112131415161718192021222324252627282930313233
  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. CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress;\
  17. rm var/cache/* -rf ;\
  18. 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. composer run-script post-install-cmd --no-interaction ;\
  24. cat app/config/hwioauthbundle/parameters.yml ; bin/console server:run 0.0.0.0 --env=dev