Public Repository

Last pushed: 2 years ago
Short Description
Debugging server that just echoes back headers
Full Description

README: Echo headers

Useful container when debugging header/proxy issues. This will listen on any
port and just echo back all the headers it gets. Here's an example -- say you
have the following containers running locally:

$ docker ps
CONTAINER ID        IMAGE                                COMMAND                CREATED             STATUS              PORTS                           NAMES
1fb3f75fe225        lightside/nginx_router:latest        "nginx -g 'daemon of   2 days ago          Up 2 days           443/tcp,>80/tcp   nginx_router
e02e7c0da7af        lightside/api:2.1.01                 "/srv/api/s            2 days ago          Up 2 days >8000/tcp          api
261276666ffc        lightside/training_worker:2.1.01     "/srv/api/d            5 days ago          Up 5 days                                           training_worker
c4f8e60df81c        postgres:9.4.1                       "/docker-entrypoint.   12 days ago         Up 10 days>5432/tcp          pg-94-server

c982d482edf5        redis:2.8.19                         "/ redi   2 weeks ago         Up 10 days          6379/tcp                        redis

And you're having trouble with the headers on the api container since
requests to it pass through two proxies. You'd do something like:

$ docker stop api; docker rm api
$ docker build -t lightside/echo_headers .
$ docker run -d --name api -e SERVER_PORT=8000 -p 8006:8000 lightside/echo_headers

so now you have a container pretending to be api and listening on the same port.

You will need to restart containers linked to api so their hosts get refreshed properly.

Docker Pull Command