mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
Revert "fix host mounts for windows"
This reverts commit 3c6cb85c74.
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
4c4080077e
commit
82dd888109
3 changed files with 5 additions and 43 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue