6

My app integrates with a web service that supports a proxy server. So I need to have integration tests that prove that works.

So I wanted to use Docker to create a local proxy server that I can run real integration tests to verify that my web service can be called through the proxy interface without errors.

So I tried https://github.com/jwilder/nginx-proxy

I started up the container with:

docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy

When I use it i get a 503 error 503 Service Temporarily Unavailable

Am I misunderstanding what this proxy does?

Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152
  • I think this is more close to what you are looking for: https://github.com/sameersbn/docker-squid – Nehal J Wani Jan 28 '17 at 13:50
  • that should be the answer to this question. it worked for me. – Nicholas DiPiazza Jan 28 '17 at 16:10
  • I ran `docker run --name squid -d --restart=always --publish 3128:3128 --volume /srv/docker/squid/cache:/var/spool/squid3 sameersbn/squid:3.3.8-22` I can now test my web service proxy integration by using proxy host/port `docker_container.host:docker_container.port(3128)` – Nicholas DiPiazza Jan 28 '17 at 16:12

1 Answers1

22

Although this has been resolved in the comments, I'll try to answer the following question:

Am I misunderstanding what this proxy does?

Yes. What your project requires, is the availability of a forward-proxy and what you are trying to use, is a reverse-proxy. This will become more clear once you go through the most top rated answers at Difference between proxy server and reverse proxy server

For a TL;DR moment:

enter image description here

There are many forward-proxy software available. You could choose any one of them for your project. Some of them are:

Community
  • 1
  • 1
Nehal J Wani
  • 16,071
  • 3
  • 64
  • 89