Need to deploy local docker image to nomad in ubuntu environment

Hi,

I am having docker image which running in my local ubuntu laptop. Also nomad is running in my ubuntu laptop where I am able to deploy the docker images into nomad. Please let me know how I can deploy local docker image into nomad. If I get the job config file to deploy local docker image to nomad then it will be very useful.

Regards,
Shankha

Nomad will try to resolve the image from a registry, so I don’t think it’s possible to use an image which is only present locally. It’s the Nomad server that has to place the job, and it doesn’t necessarily know about what images are available on the client.

Thanks a lot for the response. So I need to push the local docker image to the docker hub right?

Regards,
Shankha

not necessarily Docker Hub, but any registry that the cluster can have access to, in order to pull down the image when the job is scheduled. If it’s a public image, and you don’t need to protect it behind a private registry, you can use Docker Hub, or any number of other registries (Github, Quay, etc).

I am able to pull docker image from Azure ACR to Nomad. Thanks for the help.

1 Like

Hi ,

Can you pls help me how you were able to pull images from ACR in Nomad Job.

You can tag your image with :local or similar (if :latest Nomad wil ltry pull from the registry).

eg.

    task "service-b" {
      driver = "docker"

      config {
        image = "service_b:local"
        ports = ["service-b"]
      }
    }

I believe this is the answer… untagged or latest will try to pull the latest from the repo, if you have the image cached locally then the docker daemon will use that if the specific version tag is used.