This commit is contained in:
Sergei Shitikov
2024-09-06 21:30:46 +02:00
parent 656f38f056
commit abe8159bcb
3 changed files with 8 additions and 13 deletions
+4 -4
View File
@@ -195,7 +195,7 @@ class GenericContainer implements TestContainer
try {
$containerCreatePostBody = new ContainersCreatePostBody();
//handle withExposedPorts
if(!empty($this->exposedPorts)) {
if (!empty($this->exposedPorts)) {
$portGenerator = new RandomUniquePortGenerator();
$portMap = new \ArrayObject();
@@ -209,13 +209,13 @@ class GenericContainer implements TestContainer
$hostConfig = new HostConfig();
$hostConfig->setPortBindings($portMap);
//handle withPrivilegedMode
if($this->isPrivileged) {
if ($this->isPrivileged) {
$hostConfig->setPrivileged($this->isPrivileged);
}
$containerCreatePostBody->setHostConfig($hostConfig);
}
//handle withPrivilegedMode
if($this->isPrivileged) {
if ($this->isPrivileged) {
$hostConfig = new HostConfig();
$hostConfig->setPrivileged($this->isPrivileged);
}
@@ -239,7 +239,7 @@ class GenericContainer implements TestContainer
$this->dockerClient->containerStart($this->id);
if(!isset($this->waitStrategy)) {
if (!isset($this->waitStrategy)) {
$this->withWait(new WaitForContainer());
}