Dockermon socat - Socket Pipe
This section pertains to monitoring remote Linux / MacOS hosts or if you do not wish to run Dockermon’s internal socat due to permission errors or issues.
As of 03/06/2022 socat dependency is not needed. It is now bundled into Dockermon’s container and handles everything internally. You will need to ensure Docker can map /var/run/docker.sock on your local system as a bind mount. Typically on MacOS / Linux you don’t need to do anything, but if you get permission errors, add the /var/run/docker.sock to your Docker Desktop > Settings > Sharing section and try to create the dockermon container again.
Running alpine/socat Docker Container
There is a Docker Hub image that runs socat. This method has been bundled into the Dockermon container and is not needed for you to run Dockermon. However, this is an alertnative if you wish to expose your Docker Engine API on remote hosts to use with Dockermon. This project creates a container, links your /var/run/docker.sock and exposes port 2376 for you to access the Docker Engine API.
You do not need this if you are running Dockermon and have socat enabled (default).
- Docker Alpine Socat - Exposes Docker Engine API
docker run -d --restart=always \
-p 127.0.0.1:2376:2375 \
-v /var/run/docker.sock:/var/run/docker.sock \
alpine/socat \
tcp-listen:2375,fork,reuseaddr unix-connect:/var/run/docker.sock
The above image exposes your Docker Engine API. Dockermon does not expose the Docker Engine API unless you expose port 2375 in the docker-compose.yml.
Socat on Windows With Docker Linux
Since Docker for Windows can expose the Docker Engine API for Windows Containers on port 2375, this example will expose the Linux Docker on your Windows machine to port 2377.
If you chose the Linux subsystem then you will need to login to the Linux shell (I use Ubuntu) and install socat there. On my Windwos 10 with Ubuntu I login and run:
socat TCP-LISTEN:2377,reuseaddr,fork unix-connect:/var/run/docker.sock
On the Windows Power Shell, Run as Administator, (AFTER REPLACING LAN_IP) with your Windows LAN IP address run:
netsh interface portproxy add v4tov4 connectaddress=127.0.0.1 connectport=2377 listenport=2377 listenaddress=LAN_IP
You should now be able to connect to Docker Engine API on remote Windows / Mac OS / Linux machines.
Socat Not Needed on Windows without Linux
Docker Engine API may be exposable through the Docker Desktop App on Windows systems.
You may need to expose the port on your firewall. In Power Shell, you can run (AFTER REPLACING LAN_IP) with your Windows LAN IP address:
netsh interface portproxy add v4tov4 connectaddress=127.0.0.1 connectport=2375 listenport=2375 listenaddress=LAN_IP
Read More
- Dockermon Main
- Dockermon Features
- Dockermon Inspiration
- Dockermon Backend Details
- Dockermon Frontend Details
- Dockermon socat Socket Pipe
- Dockermon Container Image Build
- Dockermon Container Init Process
- Dockermon Container Github Updates
- Dockermon Remote Host Management
- Dockermon Host Launcher - Mac OS
- Dockermon FAQ