Skip to content

Commit 6e178c3

Browse files
author
Vítězslav Dvořák
committed
Update Docker executor to build entrypoint command manually and avoid recursion
1 parent b4948a1 commit 6e178c3

File tree

3 files changed

+49
-43
lines changed

3 files changed

+49
-43
lines changed

composer.lock

Lines changed: 42 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MultiFlexi/CommonExecutor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function setJob(Job &$job): void
4747
if (!isset($this->environment)) {
4848
$this->environment = new ConfigFields('Executor'.\Ease\Functions::baseClassName($this));
4949
}
50+
5051
$this->job = &$job;
5152
$this->setObjectName($job->getMyKey().'@'.\Ease\Logger\Message::getCallerName($this));
5253
$this->environment->addFields($job->getEnvironment());

src/MultiFlexi/Executor/Docker.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ public function cmdparams()
5252
{
5353
file_put_contents($this->envFile(), $this->job->envFile());
5454

55-
return 'run --env-file '.$this->envFile().' --entrypoint '.$this->commandline().' '.$this->job->application->getDataValue('ociimage');
55+
// Build the entrypoint command manually to avoid recursion
56+
$entrypoint = $this->job->application->getDataValue('executable');
57+
$params = $this->job->getCmdParams();
58+
$ociimage = $this->job->application->getDataValue('ociimage');
59+
60+
return 'run --env-file '.$this->envFile().' --entrypoint "'.$entrypoint.'" '.$ociimage.' '.$params;
5661
}
5762

5863
public function envFile()

0 commit comments

Comments
 (0)