Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove docker-in-docker volume setting already provided by Batch #207

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/TesApi.Web/BatchScheduler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,8 @@ private async Task<CloudTask> ConvertTesTaskToBatchTaskAsync(string taskId, TesT
// This also requires that the main task runs inside a container. So we run the "docker" container that in turn runs other containers.
// If the executor image is public, there is no need for pool ContainerConfiguration and task can run normally, without being wrapped in a docker container.
// Volume mapping for docker.sock below allows the docker client in the container to access host's docker daemon.
var containerRunOptions = $"--rm -v /var/run/docker.sock:/var/run/docker.sock -v $AZ_BATCH_NODE_ROOT_DIR:$AZ_BATCH_NODE_ROOT_DIR ";
// Remark: Batch provides "-v $AZ_BATCH_NODE_ROOT_DIR:$AZ_BATCH_NODE_ROOT_DIR" for us.
var containerRunOptions = $"--rm -v /var/run/docker.sock:/var/run/docker.sock ";
cloudTask.ContainerSettings = new TaskContainerSettings(dockerInDockerImageName, containerRunOptions);
}

Expand Down