Giter Club home page Giter Club logo

Comments (5)

jpetazzo avatar jpetazzo commented on September 13, 2024

Hi,

Unfortunately, the extra network interfaces created by pipework are not visible to Docker, and therefore, cannot be queried with the REST API.

Question: do you need to use IP addresses here? Couldn't you use the IP address of the host + mapped ports?

from pipework.

djl197 avatar djl197 commented on September 13, 2024

I want to start containers up dynamically from Jenkins, as I understand it the ports are not assigned dynamically I need to fix then when I call docker run -p. If that is correct then it means I have tovlidy every container rather than having n instances of 1 container. If it is possible to have dynamic port allocation then I can use host IP and the rest api to tell me the port. Is that possible?

from pipework.

jpetazzo avatar jpetazzo commented on September 13, 2024

You can have dynamic port allocation, no problem at all.

E.g., supposing that you want to start a container running a web server on port 80:

$ docker run -p 80 -d my_web_server
880af59a97f195470751f4a3e8569fb358b344dce2fa581199d2b06ae9f3294b
$ docker port 880af59a97f195470751f4a3e8569fb358b344dce2fa581199d2b06ae9f3294b 80
0.0.0.0:49157

Then you can connect to the host IP address on port 49157.

Does that help?

from pipework.

djl197 avatar djl197 commented on September 13, 2024

yes -sorry for late reply. All sorted now. Sorry for being a muppet.

from pipework.

jpetazzo avatar jpetazzo commented on September 13, 2024

No problem at all; I'm happy that we could help with this!

from pipework.

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.