testcontainers-java icon indicating copy to clipboard operation
testcontainers-java copied to clipboard

add loading options

Open wind57 opened this issue 1 year ago • 3 comments

wind57 avatar Apr 15 '24 12:04 wind57

I'm proposing to add two methods that will load images into k3s.

  • the first one accepts a list of existing, local, images. It uses ctr i import <IMAGE_NAME> to achieve that
  • the second method accepts paths - this is useful for when running in CI/CD and images are cached in a directory using tar achieves.

We have been using this method of loading images for a few years in spring-cloud-kubernetes, but it seems that the proper place for these would be here (unless they already exist elsewhere and I missed them).

Thank you.

wind57 avatar Apr 15 '24 12:04 wind57

I think one of the more important points is that this is to reach parity of k3s in Go, something I had asked for. Thanks @wind57! https://github.com/testcontainers/testcontainers-go/blob/main/modules/k3s/k3s.go#L186-L218

codefromthecrypt avatar Apr 15 '24 16:04 codefromthecrypt

is there anything else needed from me here? I can keep this branch up to date, if there is interest in this at all. thank you

wind57 avatar Apr 29 '24 08:04 wind57