mvn clean install
Behind a corporate proxy
java -Djava.net.preferIPv4Stack=true -Dhttp.proxyHost=$PROXY_HOST -Dhttp.proxyPort=$PROXY_PORT -jar target/app.jar
To simulate a remote client, populate the http request header X-FORWARDED-FOR with a public IP.
curl -H X-FORWARDED-FOR:$(curl -s icanhazip.com) http://localhost:8080
docker build -t scizeron/ipinfo .
Behind a corporate proxy
docker run -d -p8080:8080 -e "JAVA_OPTS=-Djava.net.preferIPv4Stack=true -Dhttp.proxyHost=$PROXY_HOST -Dhttp.proxyPort=$PROXY_PORT" scizeron/ipinfo
Push the docker image on hub.docker.com (docker login)
docker push scizeron/ipinfo
See all tags here.
docker service create --name ipinfo --replicas 1 --publish 8080:8080 scizeron/ipinfo