|
@@ -1,34 +1,24 @@
|
|
|
FROM docker.infra.flowdat.com/fd3/sf-php:latest
|
|
|
-EXPOSE 8000
|
|
|
|
|
|
ADD . /opt/dhcp
|
|
|
|
|
|
WORKDIR /opt/dhcp
|
|
|
|
|
|
-RUN rm -rf /opt/dhcp/vendor/*
|
|
|
-RUN rm -f app/config/parameters.yml
|
|
|
-RUN rm -f app/config/bundles/hwi/oauth-bundle/parameters.yml
|
|
|
-RUN rm -f app/config/bundles/ik/audit-bundle/parameters.yml
|
|
|
-RUN rm -f app/config/bundles/ik/base-admin-bundle/parameters.yml
|
|
|
-RUN rm -f app/config/bundles/ik/device-bundle/parameters.yml
|
|
|
-RUN rm -f app/config/bundles/ik/webservice-bundle/parameters.yml
|
|
|
-
|
|
|
-#RUN cp app/config/parameters.yml.docker app/config/parameters.yml
|
|
|
-#RUN cp app/config/bundles/hwi/oauth-bundle/parameters.yml.docker app/config/bundles/hwi/oauth-bundle/parameters.yml
|
|
|
-#RUN cp app/config/bundles/ik/audit-bundle/parameters.yml.dist app/config/bundles/ik/audit-bundle/parameters.yml
|
|
|
-#RUN cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
|
|
|
-#RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml
|
|
|
-#RUN cp app/config/bundles/ik/webservice-bundle/parameters.yml.docker app/config/bundles/ik/webservice-bundle/parameters.yml
|
|
|
-
|
|
|
-RUN chmod 0600 /opt/keys/*
|
|
|
-
|
|
|
-RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress
|
|
|
-
|
|
|
-RUN apt-get install -yq php-soap
|
|
|
-
|
|
|
-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
|
|
|
-
|
|
|
-RUN apt-get update && apt-get install -yq php-fpm; \
|
|
|
+RUN rm -rf vendor/*
|
|
|
+ rm -f app/config/parameters.yml; \
|
|
|
+ rm -f app/config/bundles/hwi/oauth-bundle/parameters.yml; \
|
|
|
+ rm -f app/config/bundles/ik/audit-bundle/parameters.yml; \
|
|
|
+ rm -f app/config/bundles/ik/base-admin-bundle/parameters.yml; \
|
|
|
+ rm -f app/config/bundles/ik/device-bundle/parameters.yml; \
|
|
|
+ rm -f app/config/bundles/ik/webservice-bundle/parameters.yml; \
|
|
|
+ chmod 0600 /opt/keys/*; \
|
|
|
+ eval $(ssh-agent); \
|
|
|
+ ssh-add /opt/keys/bitbucket.id_rsa; \
|
|
|
+ composer install --no-scripts --no-interaction --no-progress; \
|
|
|
+ git clone git@bitbucket.org:ikflowdat/json-wsdl.git /opt/json-wsdl; \
|
|
|
+ cd /opt/json-wsdl; \
|
|
|
+ composer install --no-scripts --no-interaction --no-progress; \
|
|
|
+ cd /opt/dhcp; \
|
|
|
mkdir -p /run/php; \
|
|
|
sed -i 's#listen = /run/php/php7.0-fpm.sock#listen = /run/php/dhcp.sock#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
sed -i 's#listen = 0.0.0.0:9000#listen = /run/php/dhcp.sock#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
@@ -39,12 +29,10 @@ RUN apt-get update && apt-get install -yq php-fpm; \
|
|
|
sed -i 's#listen.group = www-data#listen.group = root#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
sed -i 's#;listen.mode = 0660#listen.mode = 0777#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
sed -i 's#pm.max_children = 5#pm.max_children = 10#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
- sed -i 's#;pm.max_requests = 500#pm.max_requests = 500#g' /etc/php/7.0/fpm/pool.d/www.conf
|
|
|
+ sed -i 's#;pm.max_requests = 500#pm.max_requests = 500#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
+ chmod 777 -R var/cache/ var/logs/ var/sessions/
|
|
|
|
|
|
-CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ;\
|
|
|
- composer install --no-scripts --no-interaction --no-progress;\
|
|
|
- rm var/cache/* -rf ;\
|
|
|
- composer run-script post-install-cmd --no-interaction ;\
|
|
|
- chmod 777 -R var/cache/ var/logs/ var/sessions/ ;\
|
|
|
+CMD rm var/cache/* -rf; \
|
|
|
+ composer run-script post-install-cmd --no-interaction; \
|
|
|
php-fpm7.0 -F -R -O
|
|
|
|