Browse Source

Port a few PHP tests to docker (#3451)

* Port a few PHP tests to docker

There are both php5 and php7 tests here, so hopefully that makes porting
the rest easier.  I guess the other big category (missing here) is HHVM.

For some reason I had to use "sleep infinity" as the last line of these
bash scripts instead of "wait", which I had used for the same purpose
for other frameworks.  I don't know why that is.

The zend test prints out a lot of errors but it still passes verification
locally.

* Simplify PHP dockerfiles
Michael Hixson 7 years ago
parent
commit
d93047d458

+ 4 - 4
.travis.yml

@@ -119,12 +119,12 @@ env:
      - "TESTDIR=Perl/mojolicious"
      - "TESTDIR=Perl/plack"
      - "TESTDIR=Perl/web-simple"
-    # - "TESTDIR=PHP/cakephp"
+     - "TESTDIR=PHP/cakephp"
     # - "TESTDIR=PHP/hhvm"
     # - "TESTDIR=PHP/php"
     # - "TESTDIR=PHP/cygnite"
     # - "TESTDIR=PHP/codeigniter"
-    # - "TESTDIR=PHP/clancats"
+     - "TESTDIR=PHP/clancats"
     # - "TESTDIR=PHP/fat-free"
     # - "TESTDIR=PHP/fuel"
     # - "TESTDIR=PHP/kohana"
@@ -143,8 +143,8 @@ env:
     # - "TESTDIR=PHP/workerman"
     # - "TESTDIR=PHP/yaf"
     # - "TESTDIR=PHP/yii2"
-    # - "TESTDIR=PHP/zend"
-    # - "TESTDIR=PHP/zend1"
+     - "TESTDIR=PHP/zend"
+     - "TESTDIR=PHP/zend1"
     # - "TESTDIR=PHP/phreeze"
      - "TESTDIR=Python/aiohttp"
      - "TESTDIR=Python/apistar"

+ 0 - 8
frameworks/PHP/cakephp/.gitignore

@@ -1,8 +0,0 @@
-app/tmp
-/plugins
-/build
-/dist
-.DS_Store
-/tags
-app/Vendor
-deploy/php-fpm.pid

+ 2 - 2
frameworks/PHP/cakephp/app/Config/database.php

@@ -62,7 +62,7 @@ class DATABASE_CONFIG {
 	public $default = array(
 		'datasource' => 'Database/Mysql',
 		'persistent' => false,
-		'host' => 'localhost',
+		'host' => 'TFB-database',
 		'login' => 'benchmarkdbuser',
 		'password' => 'benchmarkdbpass',
 		'database' => 'hello_world',
@@ -73,7 +73,7 @@ class DATABASE_CONFIG {
 	public $test = array(
 		'datasource' => 'Database/Mysql',
 		'persistent' => false,
-		'host' => 'localhost',
+		'host' => 'TFB-database',
 		'login' => 'benchmarkdbuser',
 		'password' => 'benchmarkdbpass',
 		'database' => 'hello_world',

+ 1 - 2
frameworks/PHP/cakephp/benchmark_config.json

@@ -2,7 +2,6 @@
     "framework": "cakephp",
     "tests": [{
         "default": {
-            "setup_file": "setup_php5",
             "json_url": "/json",
             "db_url": "/db",
             "query_url": "/queries?queries=",
@@ -26,4 +25,4 @@
             "versus": "php-php5"
         }
     }]
-}
+}

+ 9 - 0
frameworks/PHP/cakephp/cakephp.dockerfile

@@ -0,0 +1,9 @@
+FROM tfb/php5:latest
+
+ADD ./ /cakephp
+WORKDIR /cakephp
+
+RUN composer.phar install --no-progress
+
+CMD service php5.6-fpm start && \
+    nginx -c /cakephp/deploy/nginx.conf -g "daemon off;"

+ 5 - 6
frameworks/PHP/cakephp/deploy/nginx.conf

@@ -1,3 +1,4 @@
+user root;
 worker_processes  auto;
 
 events {
@@ -7,7 +8,7 @@ events {
 }
 
 http {
-    include       /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/mime.types;
+    include       /nginx/conf/mime.types;
     default_type  application/octet-stream;
     access_log off;
     server_tokens off;
@@ -35,7 +36,7 @@ http {
 
 
     upstream fastcgi_backend {
-        server 127.0.0.1:9001;
+        server unix:/var/run/php/php5.6-fpm.sock;
         keepalive 50;
     }
 
@@ -43,22 +44,20 @@ http {
         listen       8080;
         server_name  localhost;
 
-        root /home/vagrant/FrameworkBenchmarks/frameworks/PHP/cakephp/app/webroot/;
+        root /cakephp/app/webroot/;
         index  index.php;
 
         location / {
             try_files $uri $uri/ /index.php?$uri&$args;
         }
 
-        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
-        #
         location ~ \.php$ {
             try_files $uri =404;
             fastcgi_pass   fastcgi_backend;
             fastcgi_keep_conn on;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
-            include        /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/fastcgi_params;
+            include        /nginx/conf/fastcgi_params;
         }
     }
 }

+ 0 - 12
frameworks/PHP/cakephp/setup.sh

@@ -1,12 +0,0 @@
-#!/bin/bash
-
-fw_depends mysql php7 composer nginx
-
-sed -i "s|'host' => '.*'|'host' => '${DBHOST}'|g" app/Config/database.php
-sed -i 's|REDISSERVER|'${DBHOST}'|g' app/Config/core.php
-sed -i 's|root .*/FrameworkBenchmarks/frameworks/PHP/cakephp|root '"${TROOT}"'|g' deploy/nginx.conf
-sed -i 's|/home/vagrant/FrameworkBenchmarks/installs/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
-
-php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
-
-nginx -c $TROOT/deploy/nginx.conf

+ 0 - 12
frameworks/PHP/cakephp/setup_php5.sh

@@ -1,12 +0,0 @@
-#!/bin/bash
-
-fw_depends mysql php5 composer nginx
-
-sed -i "s|'host' => '.*'|'host' => '${DBHOST}'|g" app/Config/database.php
-sed -i 's|REDISSERVER|'${DBHOST}'|g' app/Config/core.php
-sed -i 's|root .*/FrameworkBenchmarks/frameworks/PHP/cakephp|root '"${TROOT}"'|g' deploy/nginx.conf
-sed -i 's|/home/vagrant/FrameworkBenchmarks/installs/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
-
-php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
-
-nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/clancats/app/config/database.config.php

@@ -16,7 +16,7 @@ return array(
 		'driver' => 'mysql',
 	
 		// auth
-		'host'		=> 'localhost',
+		'host'		=> 'TFB-database',
 		'user' 		=> 'benchmarkdbuser',
 		'pass'		=> 'benchmarkdbpass',
 		'charset'	=> 'utf8'

+ 0 - 1
frameworks/PHP/clancats/benchmark_config.json

@@ -2,7 +2,6 @@
   "framework": "clancats",
   "tests": [{
 		"default": {
-		  "setup_file": "setup",
 		  "plaintext_url": "/plaintext",
 		  "json_url": "/json",
 		  "db_url": "/db",

+ 13 - 0
frameworks/PHP/clancats/clancats.dockerfile

@@ -0,0 +1,13 @@
+FROM tfb/php5:latest
+
+ADD ./ /clancats
+WORKDIR /clancats
+
+RUN composer.phar install --no-progress
+
+RUN git clone --branch v2.0.6 https://github.com/ClanCats/Framework.git clancatsapp
+RUN cp -r app/ clancatsapp/CCF/
+RUN cp -r vendor/ clancatsapp/CCF/
+
+CMD service php5.6-fpm start && \
+    nginx -c /clancats/deploy/nginx.conf -g "daemon off;"

+ 5 - 5
frameworks/PHP/clancats/deploy/nginx.conf

@@ -1,5 +1,5 @@
+user root;
 worker_processes  auto;
-
 error_log stderr error;
 
 events {
@@ -7,7 +7,7 @@ events {
 }
 
 http {
-	include       /usr/local/nginx/conf/mime.types;
+	include       /nginx/conf/mime.types;
 	default_type  application/octet-stream;
 
 	access_log off;
@@ -17,7 +17,7 @@ http {
 	keepalive_timeout  65;
 
 	upstream fastcgi_backend {
-		server 127.0.0.1:9001;
+		server unix:/var/run/php/php5.6-fpm.sock;
 		keepalive 50;
 	}
 
@@ -25,7 +25,7 @@ http {
 		listen       8080;
 		server_name  localhost;
 
-		root /home/ubuntu/FrameworkBenchmarks/;
+		root /clancats/;
 		index  index.php;
 
 		location / {
@@ -38,7 +38,7 @@ http {
 			fastcgi_keep_conn on;
 			fastcgi_index  index.php;
 			fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
-			include        /usr/local/nginx/conf/fastcgi_params;
+			include        /nginx/conf/fastcgi_params;
 		}
 	}
 }

+ 0 - 18
frameworks/PHP/clancats/setup.sh

@@ -1,18 +0,0 @@
-#!/bin/bash
-
-sed -i 's|localhost|'"${DBHOST}"'|g' app/config/database.config.php
-sed -i 's|root /home/ubuntu/FrameworkBenchmarks|root '"${TROOT}"'|g' deploy/nginx.conf
-sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
-
-fw_depends mysql php5 nginx composer
-
-rm -fr clancatsapp
-rm -fr CCF
-git clone --branch v2.0.6 https://github.com/ClanCats/Framework.git clancatsapp
-
-cp -r app/ clancatsapp/CCF/
-
-cp -r vendor/ clancatsapp/CCF/
-
-php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
-nginx -c $TROOT/deploy/nginx.conf

+ 0 - 8
frameworks/PHP/zend/.gitignore

@@ -1,8 +0,0 @@
-/vendor
-/build
-/dist
-.DS_Store
-/tags
-.idea
-/data
-/deploy/php-fpm.pid

+ 0 - 1
frameworks/PHP/zend/benchmark_config.json

@@ -2,7 +2,6 @@
   "framework": "zend",
   "tests": [{
     "default": {
-      "setup_file": "setup",
       "plaintext_url": "/plaintext",
       "json_url": "/json",
       "db_url": "/db",

+ 0 - 0
frameworks/PHP/zend/config/autoload/.gitkeep


+ 1 - 1
frameworks/PHP/zend/config/autoload/benchmarks.local.php

@@ -3,7 +3,7 @@
 return array(
     'db' => array(
         'driver'   => 'Pdo',
-        'dsn'      => 'mysql:dbname=hello_world;host=localhost;port=3306',
+        'dsn'      => 'mysql:dbname=hello_world;host=TFB-database;port=3306',
         'username' => 'benchmarkdbuser',
         'password' => 'benchmarkdbpass'
     ),

+ 5 - 94
frameworks/PHP/zend/deploy/nginx.conf

@@ -1,41 +1,24 @@
-#user  nobody;
+user root;
 worker_processes  auto;
-
-#error_log  logs/error.log;
-#error_log  logs/error.log  notice;
-#error_log  logs/error.log  info;
 error_log stderr error;
 
-#pid        logs/nginx.pid;
-
-
 events {
     worker_connections  16384;
 }
 
-
 http {
-    include       /usr/local/nginx/conf/mime.types;
+    include       /nginx/conf/mime.types;
     default_type  application/octet-stream;
 
-    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
-    #                  '$status $body_bytes_sent "$http_referer" '
-    #                  '"$http_user_agent" "$http_x_forwarded_for"';
-
-    #access_log  logs/access.log  main;
     access_log off;
     server_tokens off;
 
     sendfile        on;
-    #tcp_nopush     on;
 
-    #keepalive_timeout  0;
     keepalive_timeout  65;
 
-    #gzip  on;
-
     upstream fastcgi_backend {
-        server 127.0.0.1:9001;
+        server unix:/var/run/php/php7.2-fpm.sock;
         keepalive 50;
     }
 
@@ -43,92 +26,20 @@ http {
         listen       8080;
         server_name  localhost;
 
-        #charset koi8-r;
-
-        #access_log  logs/host.access.log  main;
-
-        #location / {
-        #    root   html;
-        #    index  index.html index.htm;
-        #}
-
-        #error_page  404              /404.html;
-
-        # redirect server error pages to the static page /50x.html
-        #
-        #error_page   500 502 503 504  /50x.html;
-        #location = /50x.html {
-        #    root   html;
-        #}
-
-        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
-        #
-        #location ~ \.php$ {
-        #    proxy_pass   http://127.0.0.1;
-        #}
-
-        root /home/tfb/FrameworkBenchmarks/php-zend-framework/public/;
+        root /zend/public/;
         index  index.php;
 
         location / {
             try_files $uri $uri/ /index.php?$uri&$args;
         }
 
-        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
-        #
         location ~ \.php$ {
             try_files $uri =404;
             fastcgi_pass   fastcgi_backend;
             fastcgi_keep_conn on;
             fastcgi_index  index.php;
-#            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
-            include        /usr/local/nginx/conf/fastcgi_params;
+            include        /nginx/conf/fastcgi_params;
         }
-
-        # deny access to .htaccess files, if Apache's document root
-        # concurs with nginx's one
-        #
-        #location ~ /\.ht {
-        #    deny  all;
-        #}
     }
-
-
-    # another virtual host using mix of IP-, name-, and port-based configuration
-    #
-    #server {
-    #    listen       8000;
-    #    listen       somename:8080;
-    #    server_name  somename  alias  another.alias;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
-
-    # HTTPS server
-    #
-    #server {
-    #    listen       443;
-    #    server_name  localhost;
-
-    #    ssl                  on;
-    #    ssl_certificate      cert.pem;
-    #    ssl_certificate_key  cert.key;
-
-    #    ssl_session_timeout  5m;
-
-    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
-    #    ssl_ciphers  HIGH:!aNULL:!MD5;
-    #    ssl_prefer_server_ciphers   on;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
 }

+ 0 - 13
frameworks/PHP/zend/setup.sh

@@ -1,13 +0,0 @@
-#!/bin/bash
-
-fw_depends mysql php7 nginx composer
-
-sed -i 's|host=localhost|host='"${DBHOST}"'|g' config/autoload/benchmarks.local.php
-sed -i 's|root .*/FrameworkBenchmarks/php-zend-framework|root '"${TROOT}"'|g' deploy/nginx.conf
-sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
-
-php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
-nginx -c $TROOT/deploy/nginx.conf 
-
-mkdir -p data/cache
-chmod 777 data/cache

+ 12 - 0
frameworks/PHP/zend/zend.dockerfile

@@ -0,0 +1,12 @@
+FROM tfb/php7:latest
+
+ADD ./ /zend
+WORKDIR /zend
+
+RUN mkdir -p data/cache
+RUN chmod 777 data/cache
+
+RUN composer.phar install --no-progress
+
+CMD service php7.2-fpm start && \
+    nginx -c /zend/deploy/nginx.conf -g "daemon off;"

+ 0 - 41
frameworks/PHP/zend1/.gitignore

@@ -1,41 +0,0 @@
-# See http://help.github.com/ignore-files/ for more about ignoring files.
-#
-# If you find yourself ignoring temporary files generated by your text editor or
-# operating system, you probably want to add a global ignore instead:
-#   git config --global core.excludesfile ~/.gitignore_global
-
-/vendor
-/build
-/dist
-.DS_Store
-/tags
-.idea
-cache.properties
-phpunit.xml
-tmp
-/deploy/php-fpm.pid
-
-# VIM
-[._]*.s[a-w][a-z]
-[._]s[a-w][a-z]
-*.un~
-Session.vim
-.netrwhist
-*~
-
-# Sublime Text
-*.sublime-workspace
-
-# Netbeans IDE
-nbproject
-
-# Eclipse IDE
-.buildpath
-.project
-.settings/
-
-# Notepad++
-nppBackup
-
-# ctags
-tags

+ 1 - 1
frameworks/PHP/zend1/application/configs/application.ini

@@ -8,7 +8,7 @@ resources.frontcontroller.moduledirectory = APPLICATION_PATH
 resources.frontcontroller.params.displayExceptions = 1
 
 resources.db.adapter = "pdo_mysql"
-resources.db.params.host = "localhost"
+resources.db.params.host = "TFB-database"
 resources.db.params.charset = "utf8"
 resources.db.params.dbname = "hello_world"
 resources.db.params.username = "benchmarkdbuser"

+ 0 - 1
frameworks/PHP/zend1/benchmark_config.json

@@ -2,7 +2,6 @@
   "framework": "zend1",
   "tests": [{
     "default": {
-      "setup_file": "setup",
       "plaintext_url": "/plaintext",
       "json_url": "/json",
       "db_url": "/db",

+ 5 - 94
frameworks/PHP/zend1/deploy/nginx.conf

@@ -1,41 +1,24 @@
-#user  nobody;
+user root;
 worker_processes  auto;
-
-#error_log  logs/error.log;
-#error_log  logs/error.log  notice;
-#error_log  logs/error.log  info;
 error_log stderr error;
 
-#pid        logs/nginx.pid;
-
-
 events {
     worker_connections  16384;
 }
 
-
 http {
-    include       /usr/local/nginx/conf/mime.types;
+    include       /nginx/conf/mime.types;
     default_type  application/octet-stream;
 
-    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
-    #                  '$status $body_bytes_sent "$http_referer" '
-    #                  '"$http_user_agent" "$http_x_forwarded_for"';
-
-    #access_log  logs/access.log  main;
     access_log off;
     server_tokens off;
 
     sendfile        on;
-    #tcp_nopush     on;
 
-    #keepalive_timeout  0;
     keepalive_timeout  65;
 
-    #gzip  on;
-
     upstream fastcgi_backend {
-        server 127.0.0.1:9001;
+        server unix:/var/run/php/php7.2-fpm.sock;
         keepalive 50;
     }
 
@@ -43,92 +26,20 @@ http {
         listen       8080;
         server_name  localhost;
 
-        #charset koi8-r;
-
-        #access_log  logs/host.access.log  main;
-
-        #location / {
-        #    root   html;
-        #    index  index.html index.htm;
-        #}
-
-        #error_page  404              /404.html;
-
-        # redirect server error pages to the static page /50x.html
-        #
-        #error_page   500 502 503 504  /50x.html;
-        #location = /50x.html {
-        #    root   html;
-        #}
-
-        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
-        #
-        #location ~ \.php$ {
-        #    proxy_pass   http://127.0.0.1;
-        #}
-
-        root /home/tfb/FrameworkBenchmarks/php-zend-framework1/public/;
+        root /zend1/public/;
         index  index.php;
 
         location / {
             try_files $uri $uri/ /index.php?$uri&$args;
         }
 
-        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
-        #
         location ~ \.php$ {
             try_files $uri =404;
             fastcgi_pass   fastcgi_backend;
             fastcgi_keep_conn on;
             fastcgi_index  index.php;
-#            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
-            include        /usr/local/nginx/conf/fastcgi_params;
+            include        /nginx/conf/fastcgi_params;
         }
-
-        # deny access to .htaccess files, if Apache's document root
-        # concurs with nginx's one
-        #
-        #location ~ /\.ht {
-        #    deny  all;
-        #}
     }
-
-
-    # another virtual host using mix of IP-, name-, and port-based configuration
-    #
-    #server {
-    #    listen       8000;
-    #    listen       somename:8080;
-    #    server_name  somename  alias  another.alias;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
-
-    # HTTPS server
-    #
-    #server {
-    #    listen       443;
-    #    server_name  localhost;
-
-    #    ssl                  on;
-    #    ssl_certificate      cert.pem;
-    #    ssl_certificate_key  cert.key;
-
-    #    ssl_session_timeout  5m;
-
-    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
-    #    ssl_ciphers  HIGH:!aNULL:!MD5;
-    #    ssl_prefer_server_ciphers   on;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
 }

+ 0 - 10
frameworks/PHP/zend1/setup.sh

@@ -1,10 +0,0 @@
-#!/bin/bash
-
-fw_depends mysql php7 nginx composer
-
-sed -i 's|host = "localhost"|host = "'"${DBHOST}"'"|g' application/configs/application.ini
-sed -i 's|root .*/FrameworkBenchmarks/php-zend-framework1|root '"${TROOT}"'|g' deploy/nginx.conf
-sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
-
-php-fpm --fpm-config $FWROOT/toolset/setup/linux/languages/php/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
-nginx -c $TROOT/deploy/nginx.conf

+ 9 - 0
frameworks/PHP/zend1/zend1.dockerfile

@@ -0,0 +1,9 @@
+FROM tfb/php7:latest
+
+ADD ./ /zend1
+WORKDIR /zend1
+
+RUN composer.phar install --no-progress
+
+CMD service php7.2-fpm start && \
+    nginx -c /zend1/deploy/nginx.conf -g "daemon off;"

+ 15 - 0
toolset/setup/docker/languages/php5.dockerfile

@@ -0,0 +1,15 @@
+FROM tfb/nginx:latest
+
+RUN add-apt-repository ppa:ondrej/php
+RUN apt-get update
+RUN apt-get install -y php5.6 php5.6-common php5.6-cli php5.6-fpm php5.6-mysql php5.6-xml php5.6-mbstring
+
+RUN mkdir /composer
+WORKDIR /composer
+
+RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
+RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
+RUN php composer-setup.php
+RUN php -r "unlink('composer-setup.php');"
+
+ENV PATH /composer:${PATH}

+ 15 - 0
toolset/setup/docker/languages/php7.dockerfile

@@ -0,0 +1,15 @@
+FROM tfb/nginx:latest
+
+RUN add-apt-repository ppa:ondrej/php
+RUN apt-get update
+RUN apt-get install -y php7.2 php7.2-common php7.2-cli php7.2-fpm php7.2-mysql php7.2-xml php7.2-mbstring
+
+RUN mkdir /composer
+WORKDIR /composer
+
+RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
+RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
+RUN php composer-setup.php
+RUN php -r "unlink('composer-setup.php');"
+
+ENV PATH /composer:${PATH}