commit aaeffc4eaf145f6abf0aa3df8b4a6fabe7125440 Author: lub Date: Fri Oct 23 22:49:28 2020 +0200 initial version diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d1e8f60 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM docker.io/alpine:latest + + +RUN apk add socat \ + && rm -rf /var/cache/apk + +USER 24975:33328 +ENTRYPOINT /usr/bin/socat diff --git a/README.md b/README.md new file mode 100644 index 0000000..1d38505 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# socat-docker + +A simple docker image based on alpine, which basically only socat. + +It can be used for example to proxy tcp connections to a socket and vice versa for bridging between network namespaced and host networking. + +This was especially developed to access node_exporter running as --net=host from a prometheus within a regular Docker network. + +UID:GID is random, but consistent across different socat-docker containers for effortless sharing of sockets via bind mounts. diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..02eaa68 --- /dev/null +++ b/update.sh @@ -0,0 +1,4 @@ +#!/bin/sh -e + +docker build -t registry.lubiland.de/socat . +docker push registry.lubiland.de/socat