Skip to content

Check newer docker-java - #1007

Closed
KostyaSha wants to merge 6 commits into
testcontainers:masterfrom
KostyaSha:patch-1
Closed

KostyaSha wants to merge 6 commits into
testcontainers:masterfrom
KostyaSha:patch-1

Conversation

@KostyaSha

Copy link
Copy Markdown

No description provided.

@rnorth

rnorth commented Dec 5, 2018

Copy link
Copy Markdown
Member

Nice, thanks @KostyaSha! It looks like we have some compilation failures (modifies API?) but we can look into these.

Sent with GitHawk

@KostyaSha

Copy link
Copy Markdown
Author

"proxy" methods from CreateContainer were removed. The idea is to use setters/getters directly on HostConfig. But i see that fluency bit struggling. If it's problematic i can add parent object reference into HostConfig constructor. That will help fluently navigate, firstly need to check how much things need to be changed here.

@rnorth

rnorth commented Dec 7, 2018

Copy link
Copy Markdown
Member

@KostyaSha I think this makes sense, and I've been able to refactor our code so that it compiles and works again 😄.

Basically, anywhere where we currently just modify a CreateContainerCmd we just need to modify a HostConfig object as well.

I'd just like to have a bit more of a play with this over the weekend, because this might overlap a little bit with some separate changes we were thinking of making, but it'll probably be fine.

Thanks, BTW, for letting us know proactively about this change! 🙇

@rnorth

rnorth commented Jan 21, 2019

Copy link
Copy Markdown
Member

I've pushed some changes to this PR branch - I hope that's OK with you. Quite a few changes, but no big deal really!

@KostyaSha

Copy link
Copy Markdown
Author

cool, thanks. People started sending PRs for new bugfixes so i will do new releases soon

public GenericContainer memoryLimitedRedis = new GenericContainer<>("redis:3.0.2")
.withCreateContainerCmdModifier(cmd -> cmd.withMemory((long) 4 * 1024 * 1024))
.withCreateContainerCmdModifier(cmd -> cmd.withMemorySwap((long) 4 * 1024 * 1024));
.withCreateContainerCmdModifier(cmd -> cmd.withHostConfig(new HostConfig().withMemory((long) 4 * 1024 * 1024)))

@KostyaSha KostyaSha Jan 21, 2019 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

for new you can use com.github.dockerjava.api.model.HostConfig#newHostConfig the only problem with thi method is that it overrides fully hostconfig internals define before

@stale

stale Bot commented May 3, 2019

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.

@stale stale Bot added the stale label May 3, 2019
@stale

stale Bot commented May 17, 2019

Copy link
Copy Markdown

This issue has been automatically closed due to inactivity. We apologise if this is still an active problem for you, and would ask you to re-open the issue if this is the case.

@stale stale Bot closed this May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants