How are IPs of containers used in steps distributed? (OD-1411)
Bastian Bohac opened 3 years ago

We use .NET Docker images in our steps for building, testing, etc. our code. Whenever a new container is started, it gets an IP in a range of 192.x whereas OneDev operates on 172.17.0.3/16. Where do these 192.x IPs come from? Is there a possibility to influence them?

  • Robin Shen commented 3 years ago

    Is it windows container or linux container?

  • Bastian Bohac commented 3 years ago

    It's a linux container.

  • Robin Shen commented 3 years ago

    For a particular job, OneDev will create a docker bridge network to run all containers inside it. You may control its gateway/subnet etc with network options in relevant executor.

  • Bastian Bohac commented 3 years ago

    Yes, that is what I tried by entering "create --subnet=172.17.0.0/16" which docker refused to do with the following error message: Failed to run command: docker network create --subnet=172.17.0.0/16 ServerDockerExecuter-76-20-0, return code: 1 Error response from daemon: Pool overlaps with other one on this address space. This makes sense, because this is the "bride" network used on our portainer where onedev is running in. That is somewhat sad, because in that net is running a NuGet server to which I want to push our compiled packages. But maybe I just need to put the NuGet server into another net.

  • Robin Shen commented 3 years ago

    Not sure what happens there. You may experiment with docker bridge network options outside of OneDev, and start container within the network to see if there is some option there to make containers able to connect to your NuGet server.

  • Bastian Bohac commented 3 years ago

    I'll try a few things. Thank you for your support. You can close this ticket. I'll revisit it if I have further questions.

  • Robin Shen changed state to 'Closed' 3 years ago
    Previous Value Current Value
    Open
    Closed
  • Robin Shen commented 3 years ago

    OK. I am closing it now. If there is any improvements need to be done at OneDev side, please let me know.

issue 1/1
Type
Question
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
OD-1411
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover