我是 docker 和 azure batch 的新手。我目前遇到的问题是我有 2 个 dotnet 控制台应用程序,其中一个在本地运行(它以编程方式在 azure 批处理上创建池、作业和任务),第二个我创建了一个 docker 映像并推送到 azure 容器注册表。现在的事情是当我从本地运行的应用程序创建 cloudtTask 作为下面的 monetione
TaskContainerSettings cmdContainerSettings = new TaskContainerSettings(
imageName: "myrepository.azurecr.io/pipeline:latest",
containerRunOptions: "--rm"
);
CloudTask containerTask = new CloudTask(
id: "task1",
commandline: cmdLine);
containerTask.ContainerSettings = cmdContainerSettings;
Console.WriteLine("Task created");
await batchClient.JobOperations.AddTaskAsync(newJobId, containerTask);
Console.WriteLine("-----------------------");
并将其添加到 BatchClient,我在 azure batch(Azure 门户)中得到的期望是这样的:
System.UnauthorizedAccessException:对路径“/home/_azbatch/.dotnet”的访问被拒绝。---> System.IO.IOException: Permission denied --- End of internal exception stack trace ---
可能是什么问题?谢谢你。