I have been trying out put go api in docker. but apparently when i do curl, I always get connection refused.
could anybody help me?
I already tried using both localhost and the ip assigned when i do docker inspect .
Below is how I run the api.
docker run --rm --net compose_default -p 3000:3000 --name go-server -d gobuild
Response from curl:
$ curl -i -X GET http://172.19.0.6:3000/all/
curl: (7) Failed connect to 172.19.0.6:3000; Connection refused
Dockerfile is as follows:
ADD booklist_api /go/src/workspace/booklist/booklist_api
RUN go install workspace/booklist/booklist_api