10 lines
		
	
	
		
			295 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
		
		
			
		
	
	
			10 lines
		
	
	
		
			295 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| 
								 | 
							
								<?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";
							 | 
						||
| 
								 | 
							
								?>
							 |