Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using a local infra_image #10318

Closed
varsanojidan opened this issue Apr 7, 2021 · 3 comments · Fixed by #13265
Closed

Allow using a local infra_image #10318

varsanojidan opened this issue Apr 7, 2021 · 3 comments · Fixed by #13265
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/driver/docker type/enhancement

Comments

@varsanojidan
Copy link

varsanojidan commented Apr 7, 2021

Proposal

Allow specifying a local infra_image under docker config in order to avoid pulling the image.

Use-cases

For my current usecase, I would like to avoid having nomad reach out to pull images at all if possible, so I was hoping to use a local version of the infra image instead of Nomad pulling it.

I can see from the code that right now its always trying to pull the infra_image when setting up the network, and you cant specify a local image like you can for task images.

@shoenig
Copy link
Member

shoenig commented Apr 8, 2021

Hi @varsanojidan, thanks for the suggestion! Indeed, looks like we don't do the same optimization around checking whether the infra_image is already downloaded like we do for task images, instead just always leaning on PullImage. I suspect most folks looking for this sort of behavior are actually running internal docker repositories, which get pulled from instead of the public docker hub. Being able to only use local images though would be a good improvement.

@l-monninger
Copy link

l-monninger commented Sep 17, 2022

Are there any known sharp corners with this? I don't know what I did to my config, but I now can't pull gcr.io/google_containers/pause-amd64.

2022-09-17T09:55:11Z  Killing              Sent interrupt. Waiting 5s before force killing
2022-09-17T09:55:10Z  Setup Failure        failed to setup alloc: pre-run hook "network" failed: failed to create network for alloc: Failed to pull `gcr.io/google_containers/pause-amd64:3.1`: API error (500): Head "https://gcr.io/v2/google_containers/pause-amd64/manifests/3.1": unauthorized: Not Authorized.
2022-09-17T09:55:10Z  Sibling Task Failed  Task's sibling "connect-proxy-tl-rpc" failed
2022-09-17T09:54:03Z  Received             Task received by client

And, when I add the pull to my startup script, I successfully pull the image:

REPOSITORY                             TAG       IMAGE ID       CREATED         SIZE
<none>                                 <none>    0c946b4c9fa5   2 days ago      856MB
hello-world                            latest    feb5d9fea6a5   11 months ago   13.3kB
golang                                 1.15      40349a2425ef   13 months ago   840MB
gcr.io/google_containers/pause-amd64   3.1       da86e6ba6ca1   4 years ago     742kB

But, the error remains. Which would suggest to me that the local infra_image is not being used. Do I need to make sure it's not using latest?

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/driver/docker type/enhancement
Projects
3 participants