I want to change the default docker registry configuration in nomad. I am setting up a nomad cluster in enterprise VM, which connects to frog artifcatory docker registry. Any docker hub images reference has to go through the internal artifactory registry.
But when I setup nomad and try to install waypoint inside nomad, it looks for busy box and waypoint server and runner images from docker hub.
How can I change the configuration for nomad to go via artifactory to reach docker hub?
3
Answers
I have asked the same question in nomad forums and got an answer for this. I am posting and adding link to the suggested answer here.
https://discuss.hashicorp.com/t/nomad-network-bridge/37421/2
It’s not possible to set a "default" registry for the Nomad client’s Docker driver. The registry would need to be set in the "image" configuration of the Nomad jobspec’s "config" stanza. Within that config stanza, or on the Nomad client, you would need to provide an "auth" stanza as well so that Nomad can pull the image from your private registry.
https://www.nomadproject.io/docs/drivers/docker
Regarding Waypoint specifically, for your requirements, I’d recommend installing Waypoint not with the
waypoint install
command, because there isn’t an option to change the Docker repository from which the busy box image is used. Instead, I’d recommend creating a custom Nomad jobspec to deploy Waypoint, and if you intend to use busy box as part of that jobspec, then to specify your image repository in Artifactory that way.