Results
total 24drwxr-xr-x 2 root root 4096 Jun 23 16:24 .drwxr-xr-x 3 root root 4096 Jun 23 15:30 ..-rw-r--r-- 1 root root 1 Jun 23 15:42 index.html-rw-r--r-- 1 root root 215 Jun 23 16:24 index.php
Using PHP./index.php
System ("sudo docker ...") is capable of executing
cannot be performed with browser access
Reply content:
Results
total 24drwxr-xr-x 2 root root 4096 Jun 23 16:24 .drwxr-xr-x 3 root root 4096 Jun 23 15:30 ..-rw-r--r-- 1 root root 1 Jun 23 15:42 index.html-rw-r--r-- 1 root root 215 Jun 23 16:24 index.php
Using PHP./index.php
System ("sudo docker ...") is capable of executing
cannot be performed with browser access
should be due to insufficient PHP permissions, you can return the system after the execution of the status code to look at, want to see the specific return results can be used with the EXEC command.
You do in the browser is the WWW user, if you use the PHP command line (PHP CLI) to execute, it is your current user, the current user has permission to run successfully.
The reason should be insufficient authority, upstairs has been said very clearly.
I say the other solution is that PHP can directly use the Docker Remote API to work with Docker
can refer to http://www.open-open.com/lib/view/open1419921028828.html