Bugfixes
This commit is contained in:
		@@ -28,6 +28,7 @@ class ContainerManager
 | 
			
		||||
 | 
			
		||||
        $serviceName = $service['name'];
 | 
			
		||||
        $instanceName = $options['name']??'default';
 | 
			
		||||
        $portOffset = intval($options['portoffset']??0);
 | 
			
		||||
 | 
			
		||||
        $containerName = "sm_".$serviceName."_".$instanceName;
 | 
			
		||||
 | 
			
		||||
@@ -39,9 +40,12 @@ class ContainerManager
 | 
			
		||||
 | 
			
		||||
        // Map the ports
 | 
			
		||||
        $ports = (array)($service['ports']??[]);
 | 
			
		||||
        $mappedPorts = [];
 | 
			
		||||
        foreach ($ports as $port) {
 | 
			
		||||
            $portNumber = intval($port['port']) + $portOffset;
 | 
			
		||||
            $args[] = '-p';
 | 
			
		||||
            $args[] = $port['port'];
 | 
			
		||||
            $args[] = $portNumber;
 | 
			
		||||
            $mappedPorts[$port['info']] = $portNumber;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Get the paths to persist
 | 
			
		||||
@@ -72,6 +76,10 @@ class ContainerManager
 | 
			
		||||
        echo "$ {$cmdl}\n";
 | 
			
		||||
        passthru($cmdl);
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            'ports' => $mappedPorts
 | 
			
		||||
        ];
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -82,7 +90,6 @@ class ContainerManager
 | 
			
		||||
        $args = [];
 | 
			
		||||
 | 
			
		||||
        $serviceName = $service['name'];
 | 
			
		||||
        $instanceName = $options['name']??'default';
 | 
			
		||||
        $containerName = "sm_".$serviceName."_".$instanceName;
 | 
			
		||||
 | 
			
		||||
        $args[] = 'stop';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user