Skip to content

Common Pitfalls

Jennings Zhang edited this page Jun 8, 2020 · 3 revisions

Localhost on Docker

localhost inside of a Docker container points to the container itself, not the host.

The default Docker network maps host to be accessible at 172.17.0.1.

export HOST_IP=$(ip route | grep -v docker | awk '{if(NF==11) print $9}')
docker run --rm fnndsc/pfurl --http ${HOST_IP}:5005/api/v1/cmd ... 

HTTP Proxy

Bypass the HTTP proxy when connecting to localhost.

env -u http_proxy pfurl --http localhost:5005/api/v1/cmd ...
Clone this wiki locally