Sfoglia il codice sorgente

Merge branch '2' of ssh://gitlab.com/interlink-sa/flowdat3/modules/cablemodem into 2

gabriel 6 anni fa
parent
commit
eed8221fbd
1 ha cambiato i file con 30 aggiunte e 33 eliminazioni
  1. 30 33
      Dockerfile

+ 30 - 33
Dockerfile

@@ -1,39 +1,29 @@
 FROM docker.infra.flowdat.com/fd3/sf-php:latest
-EXPOSE 9000
 
 ADD . /opt/cablemodem
 
 WORKDIR /opt/cablemodem
 
-RUN rm -rf /opt/cablemodem/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
-
 COPY docsis.sh /opt
-RUN chmod +x /opt/docsis.sh
-RUN bash -c /opt/docsis.sh
-COPY docsis/custom_mibs /usr/share/snmp/mibs/
 
-RUN apt-get update && apt-get install -yq php-fpm; \
+RUN chmod 0600 /opt/keys/*; \
+    eval $(ssh-agent); \
+    ssh-add /opt/keys/bitbucket.id_rsa; \
+    rm -f app/config/parameters.yml \
+          app/config/bundles/hwi/oauth-bundle/parameters.yml \
+          app/config/bundles/ik/audit-bundle/parameters.yml \
+          app/config/bundles/ik/base-admin-bundle/parameters.yml \
+          app/config/bundles/ik/device-bundle/parameters.yml \
+          app/config/bundles/ik/webservice-bundle/parameters.yml; \
+    cp app/Resources/workflows/workflow_list.yml.dist app/Resources/workflows/workflow_list.yml; \
+    cp app/config/tenencia/cablemodem_1.yml.dist app/config/tenencia/cablemodem_1.yml; \
+    cp app/config/bundles/hwi/oauth-bundle/parameters.yml.dist app/config/bundles/hwi/oauth-bundle/parameters.yml; \
+    cp app/config/bundles/ik/audit-bundle/parameters.yml.dist app/config/bundles/ik/audit-bundle/parameters.yml; \
+    cp app/config/bundles/ik/device-bundle/parameters.yml.dist app/config/bundles/ik/device-bundle/parameters.yml; \
+    cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml; \
+    cp app/config/bundles/ik/webservice-bundle/parameters.yml.dist app/config/bundles/ik/webservice-bundle/parameters.yml; \
+    cp app/config/profile.yml.dist app/config/profile.yml; \
+    cp app/config/parameters.yml.dist app/config/parameters.yml; \
     mkdir -p /run/php; \
     sed -i 's#listen = /run/php/php7.0-fpm.sock#listen = /run/php/cablemodem.sock#g' /etc/php/7.0/fpm/pool.d/www.conf; \
     sed -i 's#listen = 0.0.0.0:9000#listen = /run/php/cablemodem.sock#g' /etc/php/7.0/fpm/pool.d/www.conf; \
@@ -44,11 +34,18 @@ 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; \
+    composer install --no-scripts --no-interaction --no-progress; \
+    chmod 777 -R var/cache/ var/logs/ var/sessions/; \ 
+    git clone git@bitbucket.org:ikflowdat/json-wsdl.git /opt/json-wsdl; \
+    cd /opt/json-wsdl; \
+    composer install --no-scripts --no-interaction --no-progress; \
+    chmod +x /opt/docsis.sh; \
+    bash -c /opt/docsis.sh; \
+    rm -rf /var/lib/apt/lists/*
+    
+COPY docsis/custom_mibs /usr/share/snmp/mibs/
 
-CMD eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ;\
-    composer install --no-scripts --no-interaction --no-progress;\
-    rm var/cache/* -rf ;\
+CMD rm var/cache/* -rf ;\
     composer run-script post-install-cmd --no-interaction ;\
-    chmod 777 -R var/cache/ var/logs/ var/sessions/ ;\
     php-fpm7.0 -F -R -O