An open API service indexing awesome lists of open source software.

https://github.com/bvis/docker-socat

Provides the possibility of cat a TCP connection to a defined PORT.
https://github.com/bvis/docker-socat

daemon docker expose socat

Last synced: 6 months ago
JSON representation

Provides the possibility of cat a TCP connection to a defined PORT.

Awesome Lists containing this project

README

          

# TCP Socat

[![](https://images.microbadger.com/badges/image/basi/socat.svg)](https://microbadger.com/images/basi/socat "Get your own image badge on microbadger.com")
[![](https://images.microbadger.com/badges/version/basi/socat.svg)](https://microbadger.com/images/basi/socat "Get your own version badge on microbadger.com")
[![](https://images.microbadger.com/badges/commit/basi/socat.svg)](https://microbadger.com/images/basi/socat "Get your own commit badge on microbadger.com")

Provides the possibility of cat a TCP connection to a defined PORT.

## Use cases

If you want to export something from the Docker API in a service this can be useful.

For example it comes with default values to expose the `docker_gwbridge`.

Imagine you are exposing the "metrics" endpoint that comes with docker 1.13 in the 4999 port.

```bash
$ docker run -d --name socat-test -p 4998:4999 localhost:5000/basi/socat:v0.1.0
$ curl localhost:4998/metrics
# HELP engine_daemon_container_actions_seconds The number of seconds it takes to process each container action
# TYPE engine_daemon_container_actions_seconds histogram
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.005"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.01"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.025"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.05"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.1"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.25"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.5"} 1
...
```