tb

Tb Docker Image

ThingsBoard单实例Docker镜像,内置HSQLDB数据库,是用于物联网数据收集、处理、可视化及设备管理的开源平台。

16 次收藏下载次数: 0状态:社区镜像维护者:thingsboard仓库类型:镜像最近更新:
下载命令
点击查看

ThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management.

Documentation

ThingsBoard documentation is hosted on https://thingsboard.io/docs.

Running

Before starting Docker container run following commands to create a directory for storing data and logs and then change its owner to docker container user, to be able to change user, chown command is used, which requires sudo permissions (command will request password for a sudo access):

$ mkdir -p ~/.mytb-data && sudo chown -R 799:799 ~/.mytb-data
$ mkdir -p ~/.mytb-logs && sudo chown -R 799:799 ~/.mytb-logs

Execute the following command to run this docker directly:

$ docker run -it -p 9090:9090 -p 1883:1883 -p 7070:7070 -p 5683-5688:5683-5688/udp -v ~/.mytb-data:/data -v ~/.mytb-logs:/var/log/thingsboard --name mytb --restart always thingsboard/tb

Where:

  • docker run - run this container
  • -it - attach a terminal session with current ThingsBoard process output
  • -p 9090:9090 - connect local port 9090 to exposed internal HTTP port 9090
  • -p 1883:1883 - connect local port 1883 to exposed internal MQTT port 1883
  • -p 7070:7070 - connect local port 7070 to exposed internal Edge RPC port 7070
  • -p 5683-5688:5683-5688/udp - connect local UDP ports 5683-5688 to exposed internal COAP and LwM2M ports
  • -v ~/.mytb-data:/data - mounts the host's dir ~/.mytb-data to ThingsBoard DataBase data directory
  • -v ~/.mytb-logs/var/log/thingsboard - mounts the host's dir ~/.mytb-logs to ThingsBoard logs directory
  • --name mytb - friendly local name of this machine
  • --restart always - automatically start ThingsBoard in case of system reboot and restart in case of failure.
  • thingsboard/tb - docker image

After executing this command you can open http://{yor-host-ip}:9090 in you browser. You should see ThingsBoard login page. Use the following default credentials:

  • Systen Administrator: *** / sysadmin
  • Tenant Administrator: *** / tenant
  • Customer User: *** / customer

You can always change passwords for each account in account profile page.

You can detach from session terminal with Ctrl-p Ctrl-q - the container will keep running in the background.

To reattach to the terminal (to see ThingsBoard logs) run:

$ docker attach mytb

To stop the container:

$ docker stop mytb

To start the container:

$ docker start mytb

Upgrading

In order to update to the latest image, execute the following commands:

$ docker pull thingsboard/tb
$ docker stop mytb
$ docker run -it -v ~/.mytb-data:/data --rm thingsboard/tb upgrade-tb.sh
$ docker rm mytb
$ docker run -it -p 9090:9090 -p 1883:1883 -p 7070:7070 -p 5683-5688:5683-5688/udp -v ~/.mytb-data:/data -v ~/.mytb-logs:/var/log/thingsboard --name mytb --restart always thingsboard/tb

NOTE: replace host's directory ~/.mytb-data with directory used during container creation.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 tb 镜像标签

docker pull docker.xuanyuan.run/thingsboard/tb:<标签>

DockerHub 原生拉取命令

docker pull thingsboard/tb:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告