Dockerfile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM docker.infra.flowdat.com/fd3/sf-php:latest
  2. EXPOSE 8000
  3. ADD . /opt/cablemodem
  4. WORKDIR /opt/cablemodem
  5. RUN rm -rf /opt/cablemodem/vendor/*
  6. RUN rm -f app/config/parameters.yml
  7. RUN rm -f app/config/bundles/hwi/oauth-bundle/parameters.yml
  8. RUN rm -f app/config/bundles/ik/audit-bundle/parameters.yml
  9. RUN rm -f app/config/bundles/ik/base-admin-bundle/parameters.yml
  10. RUN rm -f app/config/bundles/ik/device-bundle/parameters.yml
  11. RUN rm -f app/config/bundles/ik/webservice-bundle/parameters.yml
  12. RUN cp app/config/parameters.yml.docker app/config/parameters.yml
  13. RUN cp app/config/bundles/hwi/oauth-bundle/parameters.yml.docker app/config/bundles/hwi/oauth-bundle/parameters.yml
  14. RUN cp app/config/bundles/ik/audit-bundle/parameters.yml.dist app/config/bundles/ik/audit-bundle/parameters.yml
  15. RUN cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
  16. RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml
  17. RUN cp app/config/bundles/ik/webservice-bundle/parameters.yml.docker app/config/bundles/ik/webservice-bundle/parameters.yml
  18. RUN chmod 0600 /opt/keys/*
  19. RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress
  20. RUN apt-get install -yq php-soap
  21. 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
  22. COPY docsis.sh /opt
  23. RUN chmod +x /opt/docsis.sh
  24. RUN bash -c /opt/docsis.sh
  25. CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ;\
  26. composer install --no-scripts --no-interaction --no-progress;\
  27. rm var/cache/* -rf ;\
  28. composer run-script post-install-cmd --no-interaction ;\
  29. php bin/console server:run 0.0.0.0 --env=dev