Search code examples
google-container-registrynomad

Nomad failing to pull from GCP container registery due to docker auth


This is my server config:

client {
    enabled = true
    servers = ["127.0.0.1:4647"]

}

I get an error of us.gcr.io/PROJECTID/IMAGE/NAME:latest: API error (404): {"message":"pull access denied for us.gcr.io/PROJECTID/IMAGE/NAME, repository does not exist or may require 'docker login'"}

I'm trying to pull an image from google cloud container registery.

How do I instruct nomad to use the docker authentication via gcloud?


Solution

  • gcloud auth configure-docker
    

    And the server config:

    client {
        enabled = true
        servers = ["127.0.0.1:4647"]
    
      options   = {
        "docker.auth.helper"     = "gcloud"
      }
    }
    

    I have no idea how this works when I'll need other docker auth helpers... But oh well