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 11 months ago
Is it windows container or linux container?
Bastian Bohac commented 11 months ago
It's a linux container.
Robin Shen commented 11 months 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 11 months 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 11 months 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 11 months 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 Shenchanged state to 'Closed'11 months ago
Previous Value
Current Value
Open
Closed
Robin Shen commented 11 months ago
OK. I am closing it now. If there is any improvements need to be done at OneDev side, please let me know.
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?