imageproxy: How to configure for docker cloud: service can't be reached
Sorry if this is a stupid question… I deployed the docker image to docker cloud. It works inside the remote terminal (localhost:8080), but the service is unreachable outside the container.
My docker-compose file looks like:
imageproxy:
image: 'willnorris/imageproxy:latest'
ports:
- '8080:8080'
I’m assuming the internal web service is blocking connections but I am not savvy enough to know how to configure it.
Thank you for an otherwise awesome service and I look forward to be being able to deploy it to docker cloud once I have figured this out.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (3 by maintainers)
To clarify.
The command line below is wrong:
Since docker already execute (ENTRYPOINT “/go/bin/imageproxy”), there is no need for that statement. Remove and it should work.
No clue. Network issue?
My mistake, I was running it inside of my Rancher cloud without parameters. It work fine for me on OSX command line.
Run it with the exact command from docker hub wiki: docker run -p 8080:8080 willnorris/imageproxy -addr 0.0.0.0:8080
http://192.168.99.100:8080/400/http://upload.gsngrocers.com/chainfiles/218/2015/8/MAR_TonyPriolo_Sept15_WELCOME.jpg
192.168.99.100 is my docker machine IP. Your IP may differ.
If you want to run it as a daemon (no interaction): docker run -p 8080:8080 -itd willnorris/imageproxy -addr 0.0.0.0:8080
To demonstrate, here’s my fork copy with custom configuration: https://github.com/trybrick/imageproxy/blob/master/Dockerfile https://github.com/trybrick/imageproxy/blob/master/scripts/run.sh
Live Docker example: Original: http://imageproxy.brickinc.net:4593/http://upload.gsngrocers.com/chainfiles/218/2015/8/MAR_TonyPriolo_Sept15_WELCOME.jpg Resized: http://imageproxy.brickinc.net:4593/300/http://upload.gsngrocers.com/chainfiles/218/2015/8/MAR_TonyPriolo_Sept15_WELCOME.jpg
Per the above configuration (run.sh), the service only work for URLs that I’ve whitelist.
Was able to reproduce this with the ‘willnorris/imageproxy’ version. I can curl port 8080 inside of the container but not from the host.
I run my own imageproxy docker with custom configuration so I know imageproxy does work inside of docker. I do not run the ‘willnorris/imageproxy’ version. My guess is the default configuration bind to 127.0.0.1 (should be 0.0.0.0) because of this line: imageproxy (version HEAD) listening on localhost:8080
localhost in the imageproxy docker container (cat /etc/hosts) is map to 127.0.0.1
I suggest changing the Dockerfile line 8 to: ENTRYPOINT [“/go/bin/imageproxy”, “-addr 0.0.0.0:8080”]