Revert "fix host mounts for windows"

This reverts commit 3c6cb85c74.
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-05-23 16:41:00 +02:00
parent 4c4080077e
commit 82dd888109
3 changed files with 5 additions and 43 deletions

View file

@ -186,30 +186,13 @@ class DockerActionManager
];
$firstChar = substr($volume->name, 0, 1);
if (!in_array($firstChar, $forbiddenChars)) {
if(!in_array($firstChar, $forbiddenChars)) {
$this->guzzleClient->request(
'POST',
$url,
[
'json' => [
'Name' => $volume->name,
],
]
);
} elseif ($this->configurationManager->isWindowsPath($volume->name)) {
$name = $this->configurationManager->GetWindowsVolumeName($volume->name);
$this->guzzleClient->request(
'POST',
$url,
[
'json' => [
'Name' => $name,
'Driver' => 'local',
'DriverOpts' => [
'type' => 'none',
'device' => $volume->name,
'o' => 'bind',
]
'name' => $volume->name,
],
]
);
@ -220,11 +203,8 @@ class DockerActionManager
public function CreateContainer(Container $container) : void {
$volumes = [];
foreach($container->GetVolumes()->GetVolumes() as $volume) {
if ($this->configurationManager->isWindowsPath($volume->name)) {
$volume->name = $this->configurationManager->GetWindowsVolumeName($volume->name);
}
$volumeEntry = $volume->name . ':' . $volume->mountPoint;
if ($volume->isWritable) {
if($volume->isWritable) {
$volumeEntry = $volumeEntry . ':' . 'rw';
} else {
$volumeEntry = $volumeEntry . ':' . 'ro';