Skip to content

Commit

Permalink
Update DockerContainerApi.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Apr 26, 2024
1 parent d5a5e6a commit a8bf0ff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions web/Modules/Docker/DockerContainerApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function run()
{
$commandId = rand(10000, 99999);

$shellFileContent = 'docker run -it --network=host --name ' . $this->name . ' ';
$shellFileContent = 'docker run --name ' . $this->name . ' ';

if (!empty($this->port)) {
$shellFileContent .= ' -p ' . $this->externalPort . ':' . $this->port . ' ';
Expand All @@ -80,8 +80,6 @@ public function run()

$shellFileContent .= PHP_EOL . 'rm -f /tmp/docker-run-container-'.$commandId.'.sh';

// dd($shellFileContent);

file_put_contents('/tmp/docker-run-container-'.$commandId.'.sh', $shellFileContent);
$output = shell_exec('bash /tmp/docker-run-container-'.$commandId.'.sh');

Expand Down

0 comments on commit a8bf0ff

Please sign in to comment.