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

Replace portBindings.add with standard way of exposing ports #107

Open
slonka opened this issue Apr 17, 2020 · 5 comments
Open

Replace portBindings.add with standard way of exposing ports #107

slonka opened this issue Apr 17, 2020 · 5 comments
Labels

Comments

@slonka
Copy link
Contributor

slonka commented Apr 17, 2020

How to expose ports:
https://www.testcontainers.org/features/networking/#exposing-container-ports-to-the-host

Where to fix:

@slonka slonka added the good first issue Good for newcomers label May 28, 2020
@Kornelos
Copy link
Contributor

I'd like to take this one

@pzmi
Copy link
Contributor

pzmi commented Oct 15, 2020

I've assigned you. Have fun :)

@Kornelos
Copy link
Contributor

Unfortunately container.getMappedPort() works only after starting containers. Test classes logic relies on fetching the port number before starting container, so in my opinion current implementation is justified.

@pzmi
Copy link
Contributor

pzmi commented Oct 23, 2020

I think @slonka had in mind using .withExposedPorts(8080, 8081) instead of portBindings.add("$externalPort:$internalPort")

@michal494
Copy link

I'll work on this during Hacktoberfest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants