I am trying to run docker networking with compilation in docker 1.9. I know this is still experimental in 1.9, but I would like to know if my use case can work.
In principle and for simplification, I have two servers, each of which is in the container. Let them be called S1 and S2. S1 opens globally and must be accessible from S2. I want to start S2 via docker-compose with the -x-networking flag (the reason I want it to be that S2 is actually a bit more complicated than what is supposed here with multiple containers, and I want so that they run on the same subnet). S1 can work with or without layout.
What I understand from docker networks is that any container can reach another from the same network or can reach everything that is "globally" displayed through host port mapping, right?
So my scenario is:
- I manually start S1 with port mapping, for example "-p 7210: 7202" (7202 is displayed in the docker file)
- S2 is created from a simple layout file and updated using the - x-networking flag. For my test case, I created a very minimal layout file, for example:
S2:
build: .
ports:
- "8080:80"
Results:
- S1 does not display from S2 under "localhost" (this is to be expected)
- S1 is not displayed with S2 in the section "172.17.0.1" (= docker0 interface)
I would expect that I could achieve this in accordance with 172.17.0.1, since S1 uses docker0, as I understand it.
, S2 , " ", S1, 172.17.0.1
? - , ?