Dockerfile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 apt-get update && apt-get install -yq php-soap python-pip
  15. RUN chmod 0600 /opt/keys/*
  16. RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress
  17. RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; git clone git@bitbucket.org:ikflowdat/extra.git /opt/extra ; cp -r /opt/extra/netmiko /opt/netmiko ; rm -rf /opt/extra
  18. RUN pip install -e /opt/netmiko
  19. 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
  20. RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  21. cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
  22. cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
  23. cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
  24. cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
  25. RUN apt-get update && apt-get install -yq php-fpm
  26. RUN sed -i 's#listen = /run/php/php7.0-fpm.sock#listen = 0.0.0.0:9000#g' /etc/php/7.0/fpm/pool.d/www.conf
  27. RUN sed -i 's#;clear_env = no#clear_env = no#g' /etc/php/7.0/fpm/pool.d/www.conf
  28. RUN mkdir -p /run/php
  29. CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress;\
  30. rm var/cache/* -rf ;\
  31. composer run-script post-install-cmd --no-interaction ;\
  32. cat app/config/hwioauthbundle/parameters.yml ;\
  33. chmod 777 -R var/cache/ var/logs/ var/sessions/ ;\
  34. php-fpm7.0 -F -R -O