From 0f499a37effd468353d032b6161ad4f9265c54ef Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 12 May 2020 10:56:47 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Tim Gross --- drivers/docker/driver.go | 4 ++-- website/pages/docs/drivers/docker.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/docker/driver.go b/drivers/docker/driver.go index 3ab4c033b..6ce1d323b 100644 --- a/drivers/docker/driver.go +++ b/drivers/docker/driver.go @@ -742,7 +742,7 @@ func (d *Driver) createContainerConfig(task *drivers.TaskConfig, driverConfig *T containerRuntime := driverConfig.Runtime if _, ok := task.DeviceEnv[nvidiaVisibleDevices]; ok { if !d.gpuRuntime { - return c, fmt.Errorf("requested docker-runtime %q was not found", d.config.GPURuntimeName) + return c, fmt.Errorf("requested docker runtime %q was not found", d.config.GPURuntimeName) } if containerRuntime != "" && containerRuntime != d.config.GPURuntimeName { return c, fmt.Errorf("conflicting runtime requests: gpu runtime %q conflicts with task runtime %q", d.config.GPURuntimeName, containerRuntime) @@ -750,7 +750,7 @@ func (d *Driver) createContainerConfig(task *drivers.TaskConfig, driverConfig *T containerRuntime = d.config.GPURuntimeName } if _, ok := d.config.allowedRuntimes[containerRuntime]; !ok && containerRuntime != "" { - return c, fmt.Errorf("requested runtime is not allowed: %q", containerRuntime) + return c, fmt.Errorf("requested runtime %q is not allowed", containerRuntime) } hostConfig := &docker.HostConfig{ diff --git a/website/pages/docs/drivers/docker.mdx b/website/pages/docs/drivers/docker.mdx index 273aa6267..bcc478cb1 100644 --- a/website/pages/docs/drivers/docker.mdx +++ b/website/pages/docs/drivers/docker.mdx @@ -407,12 +407,12 @@ The `docker` driver supports the following configuration in the job spec. Only the container's filesystem as read only. - `runtime` - (Optional) A string representing a configured runtime to pass to docker. - This is equivilent to the --runtime argument in the docker CLI + This is equivalent to the `--runtime` argument in the docker CLI For example, to use gvisor: ```hcl config { - runtime = "runsc" + runtime = "runc" } ```