Docker Image
- You can build a docker image by:
Or:
$ cd incubator-iotdb
$ cd docker
$ docker build -t iotdb:base .
Once the docker image has been built locally (the tag is iotdb:base in this example), you are almost done!
- create docker volume for data files and logs:
$ docker volume create mydata
- run a docker container:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2a68b6944cb5 iotdb:base "/iotdb/bin/start-se…" 4 minutes ago Up 5 minutes 0.0.0.0:6667->6667/tcp laughing_meitner
You can use the above command to get the container ID:
$ docker container ls
suppose the ID is
suppose the IP is
- If you just want to have a try by using iotdb-cli, you can:
$ docker exec -it /bin/bash <C_ID>
$ (now you have enter the container): /cli/sbin/start-cli.sh -h localhost -p 6667 -u root -pw root
Or, run a new docker container as the client:
- If you want to write codes to insert data and query data, please add the following dependence:
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-jdbc</artifactId>
<version>0.10.0</version>
Some examples about how to use IoTDB with IoTDB-JDBC can be found at: https://github.com/apache/incubator-iotdb/tree/master/example/jdbc/src/main/java/org/apache/iotdb
- Now enjoy it!