Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Iotdb
提交
507b9504
I
Iotdb
项目概览
apache
/
Iotdb
11 个月 前同步成功
通知
25
Star
3344
Fork
916
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
Iotdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
507b9504
编写于
4月 18, 2021
作者:
X
Xiangdong Huang
提交者:
GitHub
4月 18, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[IOTDB-1309]add dockerfile for 0.11.3 and 0.12.0 (#3023)
上级
44a209fa
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
187 addition
and
5 deletion
+187
-5
client-py/release.sh
client-py/release.sh
+3
-0
docker/ReadMe.md
docker/ReadMe.md
+45
-5
docker/src/main/Dockerfile-0.11.3
docker/src/main/Dockerfile-0.11.3
+41
-0
docker/src/main/Dockerfile-0.12.0-cluster
docker/src/main/Dockerfile-0.12.0-cluster
+53
-0
docker/src/main/Dockerfile-0.12.0-node
docker/src/main/Dockerfile-0.12.0-node
+45
-0
未找到文件。
client-py/release.sh
浏览文件 @
507b9504
...
...
@@ -19,6 +19,9 @@
# under the License.
#
# the python version must be python3.
python
--version
rm
-Rf
build
rm
-Rf
dist
rm
-Rf
iotdb_session.egg_info
...
...
docker/ReadMe.md
浏览文件 @
507b9504
...
...
@@ -19,13 +19,27 @@
-->
# Docker image version definition
Before v0.12, Apache IoTDB's docker image name and version format is:
`apache/iotdb:0.<major>.<minor>`
.
From 0.12 on, we release two images: one is for a single node, and the other is for the cluster mode.
The format is:
`apache/iotdb:0.<major>.<minor>-node`
and
`apache/iotdb:0.<major>.<minor>-cluster`
.
## The definition of tag "latest"
Before v0.12, the "latest" tag will forward to the largest
`apache/iotdb:0.<major>.<minor>`
.
From 0.12 on, the "latest" tag will forward to the largest
`apache/iotdb:0.<major>.<minor>-node`
.
# How to build
docker build -t THE_DOCKER_IMAGE_NAME:THE_VERSION -f THE_DOCKER_FILE_NAME
e.g.,
```
```
shell
docker build
-t
my-iotdb:<version>
-f
Dockerfile-<version>
```
...
...
@@ -34,17 +48,35 @@ docker build -t my-iotdb:<version> -f Dockerfile-<version>
Actually, we maintain a repo on dockerhub, so that you can get the docker image directly.
For example,
```
```
shell
docker run
-d
-p
6667:6667
-p
31999:31999
-p
8181:8181
-p
5555:5555 apache/iotdb:<version>
```
```
shell
docker run
-d
-p
6667:6667
-p
31999:31999
-p
8181:8181
-p
5555:5555
-p
9003:9003
-p
40010:40010 apache/iotdb:<version>
```
## Port description
By default, the ports that IoTDB uses are:
*
6667: RPC port
*
31999: JMX port
*
8181: Monitor port
*
5555: Data sync port
*
9003: internal metadata rpc port (for cluster)
*
40010: internal data rpc port (for cluster)
## How to configure docker volumes
The instructions below show how to store the output data and logs of IoTDB to two folders called
iotdb_data and iotdb_logs respectively.
`/D/docker/iotdb_data`
and
`/D/docker/iotdb_logs`
can be changed to any local directory of your own host.
```
```
shell
docker run
-it
-v
/D/docker/iotdb_data:/iotdb/data
-v
/D/docker/iotdb_logs:/iotdb/logs
--name
123 apache/iotdb:<version>
```
...
...
@@ -54,16 +86,24 @@ Suppose you have run an IoTDB Server in docker
1.
Use
`docker ps`
to find out the CONTAINER ID
e.g.,
```
```
shell
$
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c82321c70137 apache/iotdb:<version>
"/iotdb/sbin/start-s…"
12 minutes ago Up 12 minutes 0.0.0.0:6667->6667/tcp, 0.0.0.0:8181->8181/tcp, 5555/tcp, 0.0.0.0:31999->31999/tcp elegant_germain
```
2.
Use
`docker exec`
to attach the container:
```
```
shell
docker
exec
-it
c82321c70137 /bin/bash
```
Then, for the latest version (or, >=0.10.x), run
`start-cli.sh`
, for version 0.9.x and 0.8.1, run
`start-client.sh`
.
Or,
```
shell
docker
exec
-it
c82321c70137 start-cli.sh
```
Enjoy it!
docker/src/main/Dockerfile-0.11.3
0 → 100644
浏览文件 @
507b9504
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
FROM openjdk:11-jre-slim
RUN apt update \
# procps is for `free` command
&& apt install wget unzip lsof procps -y \
&& wget https://downloads.apache.org/iotdb/0.11.3/apache-iotdb-0.11.3-bin.zip \
# if you are in China, use the following URL
#&& wget https://mirrors.tuna.tsinghua.edu.cn/apache/iotdb/0.11.3/apache-iotdb-0.11.3-bin.zip \
&& unzip apache-iotdb-0.11.3-bin.zip \
&& rm apache-iotdb-0.11.3-bin.zip \
&& mv apache-iotdb-0.11.3 /iotdb \
&& apt remove wget unzip -y \
&& apt autoremove -y \
&& apt purge --auto-remove -y \
&& apt clean -y
EXPOSE 6667
EXPOSE 31999
EXPOSE 5555
EXPOSE 8181
VOLUME /iotdb/data
VOLUME /iotdb/logs
ENV PATH="/iotdb/sbin/:/iotdb/tools/:${PATH}"
ENTRYPOINT ["/iotdb/sbin/start-server.sh"]
docker/src/main/Dockerfile-0.12.0-cluster
0 → 100644
浏览文件 @
507b9504
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
FROM openjdk:11-jre-slim
RUN apt update \
# procps is for `free` command
&& apt install wget unzip lsof procps -y \
&& wget https://downloads.apache.org/iotdb/0.12.0/apache-iotdb-0.12.0-cluster-bin.zip \
# if you are in China, use the following URL
#&& wget https://mirrors.tuna.tsinghua.edu.cn/apache/iotdb/0.12.0/apache-iotdb-0.12.0-cluster-bin.zip \
&& unzip apache-iotdb-0.12.0-cluster-bin.zip \
&& rm apache-iotdb-0.12.0-cluster-bin.zip \
&& mv apache-iotdb-0.12.0-cluster-bin /iotdb \
&& apt remove wget unzip -y \
&& apt autoremove -y \
&& apt purge --auto-remove -y \
&& apt clean -y \
# modify the seeds in configuration file
&& sed -i '/^seed_nodes/cseed_nodes=127.0.0.1:9003' /iotdb/conf/iotdb-cluster.properties \
&& sed -i '/^default_replica_num/cdefault_replica_num=1' /iotdb/conf/iotdb-cluster.properties
# rpc port
EXPOSE 6667
# JMX port
EXPOSE 31999
# sync port
EXPOSE 5555
# monitor port
EXPOSE 8181
# internal meta port
EXPOSE 9003
# internal data port
EXPOSE 40010
VOLUME /iotdb/data
VOLUME /iotdb/logs
ENV PATH="/iotdb/sbin/:/iotdb/tools/:${PATH}"
ENTRYPOINT ["/iotdb/sbin/start-node.sh"]
docker/src/main/Dockerfile-0.12.0-node
0 → 100644
浏览文件 @
507b9504
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
FROM openjdk:11-jre-slim
RUN apt update \
# procps is for `free` command
&& apt install wget unzip lsof procps -y \
&& wget https://downloads.apache.org/iotdb/0.12.0/apache-iotdb-0.12.0-server-bin.zip \
# if you are in China, use the following URL
#&& wget https://mirrors.tuna.tsinghua.edu.cn/apache/iotdb/0.12.0/apache-iotdb-0.12.0-server-bin.zip \
&& unzip apache-iotdb-0.12.0-server-bin.zip \
&& rm apache-iotdb-0.12.0-server-bin.zip \
&& mv apache-iotdb-0.12.0-server-bin /iotdb \
&& apt remove wget unzip -y \
&& apt autoremove -y \
&& apt purge --auto-remove -y \
&& apt clean -y
# rpc port
EXPOSE 6667
# JMX port
EXPOSE 31999
# sync port
EXPOSE 5555
# monitor port
EXPOSE 8181
VOLUME /iotdb/data
VOLUME /iotdb/logs
ENV PATH="/iotdb/sbin/:/iotdb/tools/:${PATH}"
ENTRYPOINT ["/iotdb/sbin/start-server.sh"]
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录