Git Product home page Git Product logo

Comments (10)

aeneasr avatar aeneasr commented on August 20, 2024 1

I am closing this issue as it has not received any engagement from the community or maintainers in a long time. That does not imply that the issue has no merit. If you feel strongly about this issue

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas how you could contribute towards resolving it;
  • open a new issue with updated details and a plan on resolving the issue.

We are cleaning up issues every now and then, primarily to keep the 4000+ issues in our backlog in check and to prevent maintainer burnout. Burnout in open source maintainership is a widespread and serious issue. It can lead to severe personal and health issues as well as enabling catastrophic attack vectors.

Thank you to anyone who participated in the issue! 🙏✌️

from dockertest.

aeneasr avatar aeneasr commented on August 20, 2024

This is solved

from dockertest.

dennwc avatar dennwc commented on August 20, 2024

I'm not sure it is. #126 only adds a method to retrieve a host:port pair, but the library still publishes all ports and returns a mapped host:port pair (localhost:31234 instead of 172.17.0.2:3306).

from dockertest.

aeneasr avatar aeneasr commented on August 20, 2024

Oh, whoops :)

from dockertest.

aeneasr avatar aeneasr commented on August 20, 2024

Hm, not publishing those ports would break older versions - how about a flag that tells dockertest explicitly to not publish the ports if on linux?

from dockertest.

dennwc avatar dennwc commented on August 20, 2024

You mean a global or a flag in RunOptions? Either way, it will solve the compatibility issue.

from dockertest.

aeneasr avatar aeneasr commented on August 20, 2024

I think a global config (maybe at pool creation?) makes the most sense

from dockertest.

dennwc avatar dennwc commented on August 20, 2024

Sounds good! I'll work on it when I get some time.

from dockertest.

aeneasr avatar aeneasr commented on August 20, 2024

Awesome!

from dockertest.

davendu avatar davendu commented on August 20, 2024

Well, if anyone else searched through the Internet like me, here is the solution:

resource, err := pool.RunWithOptions(&dockertest.RunOptions{
	Repository: "foo", Tag: "bar",
}, func(m *dc.HostConfig) {
	m.PublishAllPorts = false
	m.Memory = 2 * consts.GB
})
ip := resource.Container.NetworkSettings.IPAddress

Should PublishAllPorts be exposed to RunOptions? Not sure.

from dockertest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.