diff --git a/src/Container/GenericContainer.php b/src/Container/GenericContainer.php index 4fd5639..d9cf72e 100644 --- a/src/Container/GenericContainer.php +++ b/src/Container/GenericContainer.php @@ -215,11 +215,11 @@ public function withHostname(string $hostname): static public function withMount(string $localPath, string $containerPath): static { - $this->mounts[] = new Mount([ - 'type' => 'bind', - 'source' => $localPath, - 'target' => $containerPath, - ]); + $mount = new Mount(); + $mount->setType('bind'); + $mount->setSource($localPath); + $mount->setTarget($containerPath); + $this->mounts[] = $mount; return $this; }