[Solved] Unable to run Golang application on Docker


Change run.sh to replace port 8080 to 8082

#!/bin/bash
echo "Listening on http://localhost:8082"
docker run -p 8082:80 codetest

I have changes port to 8082 if the port is already in use change that port again to some other port based on your available port.

If you are on Windows

netsh interface portproxy add v4tov4 listenport=8082 listenaddress=localhost connectport=8082 connectaddress=192.168.99.100(IP of the Docker)

Here is the helping discussion on port farwarding in windows with docker Solution for Windows hosts

1

solved Unable to run Golang application on Docker