mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 22:46:55 +00:00
allow to specify an apache ip-binding
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
005ad34741
commit
482b279f3c
4 changed files with 30 additions and 6 deletions
|
|
@ -314,13 +314,22 @@ class DockerActionManager
|
|||
|
||||
if(count($exposedPorts) > 0) {
|
||||
$requestBody['ExposedPorts'] = $exposedPorts;
|
||||
foreach($container->GetPorts()->GetPorts() as $port) {
|
||||
foreach ($container->GetPorts()->GetPorts() as $port) {
|
||||
$portNumber = explode("/", $port);
|
||||
$requestBody['HostConfig']['PortBindings'][$port] = [
|
||||
[
|
||||
'HostPort' => $portNumber[0],
|
||||
]
|
||||
];
|
||||
if ($this->configurationManager->GetApachePort() === $portNumber[0] && $this->configurationManager->GetApacheIPBinding() !== '') {
|
||||
$requestBody['HostConfig']['PortBindings'][$port] = [
|
||||
[
|
||||
'HostPort' => $portNumber[0],
|
||||
'HostIp' => $this->configurationManager->GetApacheIPBinding(),
|
||||
]
|
||||
];
|
||||
} else {
|
||||
$requestBody['HostConfig']['PortBindings'][$port] = [
|
||||
[
|
||||
'HostPort' => $portNumber[0],
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue