允许额外挂载路径指定 option 片段

volume-name:container-dest[:options]
This commit is contained in:
yzy 2022-09-05 23:14:58 +08:00 committed by GitHub
parent 04f66d4ee3
commit e3430f670d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,8 +132,9 @@ export default class DockerStartCommand extends InstanceCommand {
for (const it of extraVolumes) {
if (!it) continue;
const element = it.split(":");
if (element.length != 2) continue;
let [hostPath, containerPath] = element;
if (element.length < 2) continue;
let hostPath = element[0];
let containerPath = element.slice(1).join(":");
if (path.isAbsolute(containerPath)) {
containerPath = path.normalize(containerPath);