You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2020/02/18 12:33:55 UTC

[incubator-iotdb] branch docker created (now c81b63e)

This is an automated email from the ASF dual-hosted git repository.

hxd pushed a change to branch docker
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at c81b63e  add Dockerfiles for 0.8.1, 0.9.0, and 0.9.1

This branch includes the following new commits:

     new c81b63e  add Dockerfiles for 0.8.1, 0.9.0, and 0.9.1

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-iotdb] 01/01: add Dockerfiles for 0.8.1, 0.9.0, and 0.9.1

Posted by hx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hxd pushed a commit to branch docker
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit c81b63e2b017bed21883b00522f774537304b99c
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Tue Feb 18 20:33:20 2020 +0800

    add Dockerfiles for 0.8.1, 0.9.0, and 0.9.1
---
 docker/ReadMe.md                 | 38 +++++++++++++++++++++++++++++++++++++
 docker/src/main/Dockerfile       |  1 +
 docker/src/main/Dockerfile-0.8.1 | 40 +++++++++++++++++++++++++++++++++++++++
 docker/src/main/Dockerfile-0.9.0 | 41 ++++++++++++++++++++++++++++++++++++++++
 docker/src/main/Dockerfile-0.9.1 | 41 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 161 insertions(+)

diff --git a/docker/ReadMe.md b/docker/ReadMe.md
new file mode 100644
index 0000000..5763078
--- /dev/null
+++ b/docker/ReadMe.md
@@ -0,0 +1,38 @@
+# How to build
+
+docker build -t THE_DOCKER_IMAGE_NAME:THE_VERSION -f THE_DOCKER_FILE_NAME
+
+e.g.,
+
+```
+docker build -t my-iotdb:0.9.1 -f Dockerfile-0.9.1
+```
+
+# How to run IoTDB server 
+
+Actually, we maintain a repo on dockerhub, so that you can get the docker image directly.
+
+For example,
+```
+docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 -p 5555:5555 apache/iotdb:0.9.1
+```
+
+# How to run IoTDB client
+
+Suppose you have run an IoTDB Server in docker
+
+1. Use `docker ps` to find out the CONTAINER ID
+e.g.,
+```
+$ docker ps
+CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                                                                                NAMES
+c82321c70137        apache/iotdb:0.9.1  "/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:
+```
+docker exec -it c82321c70137 /bin/bash
+```
+
+Then, run `start-client.sh`
+
+Enjoy it!
\ No newline at end of file
diff --git a/docker/src/main/Dockerfile b/docker/src/main/Dockerfile
index f6d0397..4ed91c3 100644
--- a/docker/src/main/Dockerfile
+++ b/docker/src/main/Dockerfile
@@ -17,6 +17,7 @@
 # under the License.
 #
 
+# this docker file shows how to build an IoTDB image from IoTDB source codes.
 FROM ubuntu:18.04
 RUN apt update \
   && apt install wget unzip lsof maven thrift-compiler=0.9.1-2.1 -y \
diff --git a/docker/src/main/Dockerfile-0.8.1 b/docker/src/main/Dockerfile-0.8.1
new file mode 100644
index 0000000..5ad73b7
--- /dev/null
+++ b/docker/src/main/Dockerfile-0.8.1
@@ -0,0 +1,40 @@
+#
+# 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://www-us.apache.org/dist/incubator/iotdb/0.8.1-incubating/apache-iotdb-0.8.1-incubating-bin.zip \
+  # if you are in China, use the following URL
+  #&& wget http://mirrors.tuna.tsinghua.edu.cn/apache/incubator/iotdb/0.8.1-incubating/apache-iotdb-0.8.1-incubating-bin.zip \
+  && unzip apache-iotdb-0.8.1-incubating-bin.zip \
+  && rm apache-iotdb-0.8.1-incubating-bin.zip \
+  && mv apache-iotdb-0.8.1-incubating /iotdb \
+  && sed -i '150d' /iotdb/conf/logback.xml \
+  && apt remove wget unzip -y \
+  && apt autoremove -y \
+  && apt purge --auto-remove -y \
+  && apt clean -y
+EXPOSE 6667
+EXPOSE 31999
+VOLUME /iotdb/data
+VOLUME /iotdb/logs
+ENV PATH="/iotdb/sbin/:/iotdb/tools/:${PATH}"
+ENTRYPOINT ["/iotdb/sbin/start-server.sh"]
diff --git a/docker/src/main/Dockerfile-0.9.0 b/docker/src/main/Dockerfile-0.9.0
new file mode 100644
index 0000000..089a018
--- /dev/null
+++ b/docker/src/main/Dockerfile-0.9.0
@@ -0,0 +1,41 @@
+#
+# 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://www-us.apache.org/dist/incubator/iotdb/0.9.0-incubating/apache-iotdb-0.9.0-incubating-bin.zip \
+  # if you are in China, use the following URL
+  #&& wget http://mirrors.tuna.tsinghua.edu.cn/apache/incubator/iotdb/0.9.0-incubating/apache-iotdb-0.9.0-incubating-bin.zip \
+  && unzip apache-iotdb-0.9.0-incubating-bin.zip \
+  && rm apache-iotdb-0.9.0-incubating-bin.zip \
+  && mv apache-iotdb-0.9.0-incubating /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"]
diff --git a/docker/src/main/Dockerfile-0.9.1 b/docker/src/main/Dockerfile-0.9.1
new file mode 100644
index 0000000..a2be2e4
--- /dev/null
+++ b/docker/src/main/Dockerfile-0.9.1
@@ -0,0 +1,41 @@
+#
+# 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://www-us.apache.org/dist/incubator/iotdb/0.9.1-incubating/apache-iotdb-0.9.1-incubating-bin.zip \
+  # if you are in China, use the following URL
+  #&& wget http://mirrors.tuna.tsinghua.edu.cn/apache/incubator/iotdb/0.9.1-incubating/apache-iotdb-0.9.1-incubating-bin.zip \
+  && unzip apache-iotdb-0.9.1-incubating-bin.zip \
+  && rm apache-iotdb-0.9.1-incubating-bin.zip \
+  && mv apache-iotdb-0.9.1-incubating /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"]