Modbus Implementation in Go
172
A production-ready MODBUS TCP server and client implementation in Go.
# Run the MODBUS server
docker run -d -p 5502:5502 adibhanna/modbus-go:latest
# Or with standard MODBUS port
docker run -d -p 502:502 -p 5502:5502 adibhanna/modbus-go:latest
| Tag | Description |
|---|---|
latest | Latest stable release |
v1.1.0 | Version 1.1.0 - Go 1.25, Docker support |
v1.0.0 | Version 1.0.0 - Initial release |
| Port | Description |
|---|---|
| 502 | Standard MODBUS TCP port |
| 5502 | Alternative MODBUS TCP port |
The image includes these pre-built binaries:
| Binary | Description |
|---|---|
/app/bin/advanced_server | Full-featured MODBUS server (default) |
/app/bin/tcp_server | Simple TCP server |
/app/bin/tcp_client | TCP client example |
/app/bin/integration_test | Integration test suite |
/app/bin/config_showcase | Configuration examples |
docker run -d \
--name modbus-server \
-p 5502:5502 \
adibhanna/modbus-go:latest
docker run -d \
--name modbus-simple \
-p 5502:5502 \
adibhanna/modbus-go:latest \
/app/bin/tcp_server
docker run -d \
--name modbus-server \
-p 5502:5502 \
-v /path/to/config.json:/app/config.json \
adibhanna/modbus-go:latest
version: '3.8'
services:
modbus-server:
image: adibhanna/modbus-go:latest
ports:
- "5502:5502"
restart: unless-stopped
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "5502"]
interval: 30s
timeout: 10s
retries: 3
The container runs as non-root user modbus (UID 1000) for security.
The image includes a built-in health check:
nc -z localhost 5502
MIT License - see LICENSE
Content type
Image
Digest
sha256:dc60fe986…
Size
18.1 MB
Last updated
10 months ago
docker pull adibhanna/modbus-go