
iotechsys/connect-opc-ua-server本镜像为连接OPC UA服务器的专用Docker镜像,基于OPC UA标准协议实现与工业设备的通信,提供稳定的连接管理、数据采集及传输功能,简化工业自动化和物联网场景中OPC UA服务器的集成流程。
通过docker run命令直接启动容器,基本配置示例:
bashdocker run -d --name opc-connector \ -e OPC_SERVER_URL="opc.tcp://192.168.1.100:4840" \ -e OPC_USERNAME="operator" \ -e OPC_PASSWORD="opcpass123" \ opc-ua-connector:latest
| 参数名 | 描述 | 类型 | 默认值 | 必填 |
|---|---|---|---|---|
| OPC_SERVER_URL | OPC UA服务器地址(含端口) | 字符串 | 无 | 是 |
| OPC_USERNAME | 连接用户名 | 字符串 | 空 | 否 |
| OPC_PASSWORD | 连接密码 | 字符串 | 空 | 否 |
| LOG_LEVEL | 日志级别(debug/info/warn/error) | 字符串 | info | 否 |
| RECONNECT_INTERVAL | 重连间隔(秒) | 整数 | 30 | 否 |
| TIMEOUT | 连接超时时间(秒) | 整数 | 10 | 否 |
| SECURITY_POLICY | 安全策略(None/Basic256等) | 字符串 | None | 否 |
如需复杂配置(如多节点订阅、自定义命名空间),可通过挂载配置文件实现:
bashdocker run -d --name opc-connector \ -v /host/path/config.yaml:/app/config.yaml \ opc-ua-connector:latest --config /app/config.yaml
配置文件示例(YAML格式):
yamlserver_url: "opc.tcp://192.168.1.100:4840" username: "operator" password: "opcpass123" security_policy: "Basic256Sha256" reconnect_interval: 20 timeout: 15 subscriptions: - node_id: "ns=2;s=Temperature" sampling_interval: 1000 - node_id: "ns=2;s=Pressure" sampling_interval: 2000
yamlversion: '3.8' services: opc-connector: image: opc-ua-connector:latest container_name: opc-connector restart: unless-stopped environment: - OPC_SERVER_URL=opc.tcp://opc-server:4840 - OPC_USERNAME=admin - OPC_PASSWORD=secure_password - LOG_LEVEL=debug - RECONNECT_INTERVAL=15 volumes: - ./opc-logs:/app/logs # 日志持久化 - ./config.yaml:/app/config.yaml # 自定义配置 networks: - industrial-net # 接入工业控制网络 networks: industrial-net: driver: bridge
/app/logs/opc-connector.log,建议通过卷挂载至宿主机持久化docker logs -f opc-connectorOPC_SERVER_URL是否正确、服务器端口是否开放、防火墙策略是否允许TIMEOUT参数或检查网络延迟Basic256Sha256)并使用加密传输RECONNECT_INTERVAL参数优化重连效率,减少资源占用





manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务