![]() ![]() I've googled this problem and found many StackOverflow questions but neither helped me solve my issue, most of them were oriented to Linux or Mac so the solution didn't apply to my situation.Īlso, I can run the Go code on my computer and access the website from another device in the same network through my computer's IP. I'm also not sure which IP I'm supposed to write in that command I used my computer's IP, I've also tried 127.0.0.1 (localhost) but that gave me the same result: couldn't access the website through any IP whatsoever. I've also tried specifying the IP like this: docker run -p 192.168.0.157:8080:8080 dockertestīut when I do that I can access the website through neither the docker machine's IP nor the specified IP on the command line above. ![]() That works and I get to access the server through docker's machine IP (the one that appears on the Docker Quickstart Terminal when initiated), the problem is I can't access the website I'm hosting from outside the host, so if I try to open the same IP address on my phone it just gives me an error: This webpage is not available (ERR_CONNECTION_TIMED_OUT). I'm running the server on port 8080 so I expose that port to the host running the container like this: docker run -p 8080:8080 dockertest So I have a very simple Go code that starts a server, I have built the docker image which installs Go and builds the code in a Linux base image. I've just started with docker so I'm a little lost here. I've created my first docker container, it's running a server using Go but I can't access it from outside the host computer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |