Sign inSign up

czerasz/http-debugger

By czerasz

Updated 10 months ago

HTTP Debugging Application

Image
2

10K+

czerasz/http-debugger repository overview

Simple HTTP Debugging Application

This repository contains Dockerfile for Docker's automated build published to the public Docker Hub Registry.

Base Docker Image

Installation

  1. Install Docker

  2. Download automated build from public Docker Hub Registry:

    docker pull czerasz/http-debugger
    

    Alternatively, you can build an image from Dockerfile:

    docker build --tag czerasz/http-debugger github.com/czerasz/docker-http-debugger
    

Usage

Start the container:

docker run -t --rm -p 3000:3000 czerasz/http-debugger

Test the application with curl:

$ curl -i -XPOST localhost:3000/test -d 'test=true'
HTTP/1.1 200 OK
X-Powered-By: Express
X-Debug: true
Content-Type: text/html; charset=utf-8
Content-Length: 2
ETag: W/"2-79dcdd47"
Date: Wed, 13 May 2015 16:25:37 GMT
Connection: keep-alive

ok

Now go back to the terminal where the container runs. You will see the request details:

> [email protected] start /usr/local/bin/app
> node index.js

Debugging app listening at http://:::3000

--- --- --- --- --- --- --- --- --- --- --- --- ---

[2015-05-13 16:25:37] Request 1

POST/1.1 /test on :::3000

Headers:
 - user-agent: curl/7.38.0
 - host: localhost:3000
 - accept: */*
 - content-length: 9
 - content-type: application/x-www-form-urlencoded

No cookies

Body:
test=true
Use with Unix Socket

Make sure the directory exists:

SOCKET_DIRECTORY=/var/app/app_name/shared/tmp/sockets/
mkdir -p $SOCKET_DIRECTORY
docker run -t --rm \
       -v $SOCKET_DIRECTORY:$SOCKET_DIRECTORY \
       -e LISTEN_SOCKET="${SOCKET_DIRECTORY}app_name.0.sock" \
       czerasz/http-debugger

Tag summary

Content type

Image

Digest

sha256:c66905eb4

Size

115.7 MB

Last updated

almost 10 years ago

docker pull czerasz/http-debugger