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.
- Host: GitHub
- URL: https://github.com/bvis/docker-socat
- Owner: bvis
- Created: 2016-12-21T01:34:02.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-22T16:54:15.000Z (about 7 years ago)
- Last Synced: 2025-03-24T20:11:11.614Z (7 months ago)
- Topics: daemon, docker, expose, socat
- Language: Dockerfile
- Size: 2.93 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TCP Socat
[](https://microbadger.com/images/basi/socat "Get your own image badge on microbadger.com")
[](https://microbadger.com/images/basi/socat "Get your own version badge on microbadger.com")
[](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
...
```