Servicedock: Webgui for Docker Swarm. Manage Docker Swarm a a Service.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

9 lines
295 B

<?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";
?>