tweakmy
(Tweakmy)
November 23, 2016, 11:45am
1
I have created a docker images with following dockerfile
FROM golang:1.7.3-nanoserver
ADD simplehttp.go C:/gopath/simplehttp.go
EXPOSE 8081
CMD go run simplehttp.go
By running:
docker run -p 8081:8081 simplehttp:v1
I could curl to the docker host(which is the VM) 192.168.122.236:8081 from my PC
However:
docker network create -d transparent MyTransparentNetwork
docker run --network=MyTransparentNetwork simplehttp:v1
I could not curl to the container(192.168.122.220:8081) attached to
transparent network however I could ping the container with the
transparent ip(192.168.122.220) from my PC.
I wonder what I could have missed.
jakubv
(Jakubv)
November 25, 2016, 12:43am
2
Hi, has been met everything mentioned here (MSDN) ?
tweakmy
(Tweakmy)
November 27, 2016, 11:53pm
3
Yes, I think pretty much is ok because the ip was assigned by the hypervisor host. I could ping the tp ip but only I could not get to web http.
jakubv
(Jakubv)
November 28, 2016, 8:57am
4
Hi,
try include the following main.go instead of your simplehttp.go .
And then expose 8080 and access via IP of the container and 8080 port. My container is working as expected:
tweakmy
(Tweakmy)
November 29, 2016, 11:11am
5
Ok i finally figure it out. It was windows firewall which was blocking it. It was working after all.