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

How to build a node image with preloaded docker images #2063

Closed
hatzhang opened this issue Feb 9, 2021 · 6 comments
Closed

How to build a node image with preloaded docker images #2063

hatzhang opened this issue Feb 9, 2021 · 6 comments
Assignees
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@hatzhang
Copy link

hatzhang commented Feb 9, 2021

Is there a way to build a node image with some preloaded docker images/tars, then when the cluster is created with kind create cluster --image, those docker images will need not be pulled inside or loaded into kind.

@hatzhang hatzhang added the kind/support Categorizes issue or PR as a support question. label Feb 9, 2021
@BenTheElder BenTheElder self-assigned this Feb 9, 2021
@BenTheElder
Copy link
Member

This is not supported currently. It's possible to reproduce what kind does internally, but you'd have to do it yourself, and it's going to be clunky and brittle (you can't do this in a normal docker build for example).

I recommend just using a local registry, or saving all the images you want to a tarball (e.g. docker save) so you can load them in one-shot with kind load image-archive.

@dkoshkin
Copy link

I have the same use-case, for air-gapped installations it would be great to be able to build a custom image with additional images pre-loaded.
I would be happy to work on this, please let me know.

@BenTheElder
Copy link
Member

see: #2160 for current discussion 😅

@nitishm
Copy link

nitishm commented Jun 24, 2021

I noticed this PR as well - #2303. Wonder if this might be something that I could try? I essentially want to prime by kind node with some docker images to speed up my CI pipeline (since pulling images takes a lot of time at the moment leading to slow tests)

@BenTheElder
Copy link
Member

#2303 is the current in-review PR for issue #2160.

@BenTheElder
Copy link
Member

You will still have to pull down the content of course, the total download size is not easily decreased, but it can be done at a different point in the process (arguably one that is less concurrent and not necessarily net improvement in performance, unless you are managing to cache images at the CI level, in which case it may be a big win)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

4 participants