Installing ThingsBoard using Docker (Windows)
This guide will help you to install and start ThingsBoard using Docker on Windows.
本章描述如何使用Docker在Windows系统中安装并启动ThingsBoard。
安装步骤
- Install Docker Toolbox for Windows
- Open “Docker Quickstart Terminal”
- Make a folder to store docker files:
- 安装WindowsDocker工具箱。
- 打开“Docker Quickstart Terminal”。
- 创建文件夹存放docker文件:
mkdir <docker-folder>
cd <docker-folder>
- Download the following files from thingsboard repo:
- docker-compose.yml - main docker-compose file.
- .env - main env file that contains default location of cassandra data folder and cassandra schema.
- tb.env - default thingsboard environment variables.
- 从thingsboard repo中下载如下文件:
- docker-compose.yml - 主要的docker-compose文件.
- .env - 主要的env文件,该文件包含cassandra数据文件夹和cassandra schema的默认位置.
- tb.env - 默认thingsboard环境变量.
curl -L https://raw.githubusercontent.com/thingsboard/thingsboard/release-1.3/docker/docker-compose.yml > docker-compose.yml
curl -L https://raw.githubusercontent.com/thingsboard/thingsboard/release-1.3/docker/.env > .env
curl -L https://raw.githubusercontent.com/thingsboard/thingsboard/release-1.3/docker/tb.env > tb.env
- If you have already installed ThingsBoard using docker and want to upgrade or cleanup your installation, please cleanup HSQLDB data directory
如果你想更新或清除您使用docker安装的ThingsBoard,请清除HSQLDB数据目录。
docker-machine ssh default 'rm -rf /home/docker/hsqldb_volume'
- If you would like to create system and demo data and to start ThingsBoard node execute next command
- 执行以下命令可以创建系统,创建演示数据,启动ThingsBoard节点:
ADD_SCHEMA_AND_SYSTEM_DATA=true ADD_DEMO_DATA=true bash -c 'docker-compose up -d tb'
- In case you would like to skip creation of system and demo data or you have already added and you only need to start ThingsBoard node then execute docker-compose command
- 如果你只想启动ThingsBoard节点,请执行docker-compose命令:
docker-compose up -d tb
- In order to get access to necessary resources from external IP/Host after ThingsBoard docker container installation, please execute the following commands on windows host machine:
ThingsBoard docker容器安装完成后,如果你想通过外部IP/主机访问资源,请在主机上执行以下命令:
# Web UI port
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm "default" natpf1 "tcp-port8080,tcp,,8080,,8080"
# MQTT port
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm "default" natpf1 "tcp-port1883,tcp,,1883,,1883"
# CoAP port
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm "default" natpf1 "tcp-port5683,tcp,,5683,,5683"
- Now you should be able to open Web UI using following link:
- 现在,您可以通过以下链接打开Web页面了:
http://localhost:8080/
Advanced usage
See corresponding page in linux guide for more details. Troubleshooting
DNS issues
Note If you observe errors related to DNS issues, for example 127.0.1.1:53: cannot unmarshal DNS message You may configure your system to use Google public DNS servers