hashicorp / nomad

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
https://www.nomadproject.io/
Other
14.87k stars 1.95k forks source link

Incorrect documentation around docker auth #20630

Closed geekodour closed 5 months ago

geekodour commented 5 months ago

https://developer.hashicorp.com/nomad/docs/v1.6.x/drivers/docker#authentication mentions the following

plugin "docker" {
  config {
    auth {
      helper = "ecr-login"
    }
  }
}

while as per https://github.com/hashicorp/nomad/blob/a3b1810bdbc2be395d2e4035dd8ce45e4b5ce33b/drivers/docker/config.go#L60-L63

it should be

plugin "docker" {
    auth {
      helper = "ecr-login"
    }
}
geekodour commented 5 months ago

In nixos config, it would go file

      plugin = {
        docker."auth.helper" = "ecr-login";
      };

Update: The above did not actually work, what worked in nixos+nomad for specifying plugin options is the following:

pkazmierczak commented 5 months ago

Hi @geekodour, thanks for filing an issue! I'm afraid the documentation is correct, though, plugin configuration must live within a config block. Have a look at the configSpec structure to better understand how plugin config is parsed.

geekodour commented 4 months ago

@pkazmierczak yes you're right, I've updated my previous comment to reflect the same. Apologies for the confusion!

geekodour commented 4 months ago

@tgross ^ updated the comment with appropriate config that worked. Think it's an issue already being tracked.