Ver Fonte

Remove apt trash

Gabriel há 6 anos atrás
pai
commit
b66eb15136
1 ficheiros alterados com 19 adições e 23 exclusões
  1. 19 23
      Dockerfile

+ 19 - 23
Dockerfile

@@ -1,26 +1,22 @@
 FROM docker.infra.flowdat.com/fd3/sf-php:latest
-EXPOSE 8000
 
 ADD . /opt/radius
 
 WORKDIR /opt/radius
 
-RUN rm -rf /opt/radius/vendor/*
-RUN rm -f app/config/parameters.yml
-RUN rm -f app/config/url_webservice.yml
-RUN rm -f app/config/hwioauthbundle/parameters.yml
-
-RUN rm -rf /opt/radius/app/config/parameters.yml /opt/radius/app/config/url_webservice.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 chmod 0600 /opt/keys/*; \
+    eval $(ssh-agent); \
+    ssh-add /opt/keys/bitbucket.id_rsa; \
+    rm -f app/config/parameters.yml \
+          app/config/url_webservice.yml \
+          app/config/hwioauthbundle/parameters.yml \
+          app/config/parameters.yml \
+          app/config/url_webservice.yml; \
+    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/radius; \
     mkdir -p /run/php; \
     sed -i 's#listen = /run/php/php7.0-fpm.sock#listen = /run/php/radius.sock#g' /etc/php/7.0/fpm/pool.d/www.conf; \
     sed -i 's#listen = 0.0.0.0:9000#listen = /run/php/radius.sock#g' /etc/php/7.0/fpm/pool.d/www.conf; \
@@ -31,10 +27,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/; \
+    rm -rf /var/lib/apt/lists/*
 
-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/ ;\
- 	php-fpm7.0 -F -R -O
+CMD rm var/cache/* -rf; \
+    composer run-script post-install-cmd --no-interaction; \
+    php-fpm7.0 -F -R -O