0

For a project I need to have a constant name for the network id of the network which is created by Docker. Whenever I run the containers, for accessing to one of them from the host computer, I need to find the new Network Id that is created, so it creates some problems for automating my project.

If anyone has a solution for the mentioned problem, I will appreciate it if let me know.

For specifying the problem more, In the response to the comments that @DavidMaze and @NicoHaase expressed, I have tried to give more information. I will appreciate if you refer to the mentioned comments in order to give me a practical solution.

  • Does this answer your question? [How to set docker container hostname/IP permanently?](https://stackoverflow.com/questions/35466423/how-to-set-docker-container-hostname-ip-permanently) – Nico Haase Jan 24 '22 at 11:47
  • Do you have an example of when you might need this? This is intrinsically something that's not fixed – the name of the network(s) can be chosen by the operator, the ID is randomly generated – but in most practical use you don't need to directly interact with Docker networks from code at all, and need unusual privileges to do so. – David Maze Jan 24 '22 at 11:55
  • Dear @NicoHaase, thank you for your answer, but that is nothing that I need. I need to have a fixed name for Network Id which is seen whenever the command "Ifconfig" is run in Linux environment. is that clear? – fresxc kiuhnm Jan 24 '22 at 12:15
  • Dear @DavidMaze, I have a core network of LTE which is run in containers, and my RAN (Radio Access Network) program for accessing to the core network, it needs to know the Network Id of the core network. Without knowing the Network Id, my RAN program, which runs in the host, cannot communicate with the core network because it uses the Network Id to route its traffic to the core network. Apart from setting the IP address of the core network in my RAN program, it needs to the network interface of the IP address - here it is the Network Id. – fresxc kiuhnm Jan 24 '22 at 12:15
  • Please add **all** clarification to your question by editing it – Nico Haase Jan 24 '22 at 12:37

0 Answers0