Skip to content

Conversation

@wind57
Copy link
Contributor

@wind57 wind57 commented Oct 1, 2024

No description provided.

@wind57 wind57 changed the title fix replace deprecated method Oct 1, 2024

private static final K3sContainer CONTAINER = new FixedPortsK3sContainer(DockerImageName.parse(Commons.RANCHER))
.configureFixedPorts(EXPOSED_PORTS)
.withFileSystemBind(TEMP_FOLDER, TEMP_FOLDER)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the idea is this: withFileSystemBind is deprecated and the suggested solution is to use withCopyFileToContainer. There are numerous issue with that one though (there are some people complaining about this also, not just us). The first issue is that this is highly demanding memory wise, especially since we have lots of big images, so my first attempt was failing with OOM. There could be work-arounds, like copying tar files individually, but this is a huge problem in our case, because reuse for testcontainers would be broken (if needed will go into more details here, just let me know).

I've spent a few days here trying various things in a (now closed) PR, but the code was too involved and we would need a lot of changes to make it work. Instead, I decided to go to the "native" way to bound the directory, just like docker run -v ..., but from java code. This is not going to be removed or deprecated ever, so to me, we are good this way

@wind57 wind57 marked this pull request as ready for review October 1, 2024 12:34
@ryanjbaxter ryanjbaxter added this to the 3.1.4 milestone Oct 1, 2024
@ryanjbaxter ryanjbaxter merged commit ba5d26b into spring-cloud:3.1.x Oct 1, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants