10 lines
295 B
10 lines
295 B
9 years ago
|
<?php
|
||
|
$container=$_REQUEST['container'];
|
||
|
$action=$_REQUEST['action'];
|
||
|
if (!preg_match(',^[a-f0-9]+$,', $container)) exit(1);
|
||
|
if (!preg_match(',start|stop|pause|unpause|rm,', $action)) exit(1);
|
||
|
exec('docker '.$action.' '.$container, $res, $ret);
|
||
|
if ($ret!=0) exit(1);
|
||
|
echo "executed $action";
|
||
|
?>
|