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 2019/09/27 00:57:16 UTC

[incubator-iotdb] branch rel/0.8 updated: add new dockerfile for download apache binary file directly;

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

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


The following commit(s) were added to refs/heads/rel/0.8 by this push:
     new 1d98350  add new dockerfile for download apache binary file directly;
1d98350 is described below

commit 1d983504109600de142aaaaf314f55b1a0ae115e
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Fri Sep 27 08:56:58 2019 +0800

    add new dockerfile for download apache binary file directly;
---
 docker/src/main/Dockerfile        | 21 +++++++++-----------
 docker/src/main/binary/Dockerfile | 41 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 12 deletions(-)

diff --git a/docker/src/main/Dockerfile b/docker/src/main/Dockerfile
index f3acbea..6ae4893 100644
--- a/docker/src/main/Dockerfile
+++ b/docker/src/main/Dockerfile
@@ -17,23 +17,21 @@
 # under the License.
 #
 
-FROM ubuntu:18.04
+#This file allow you compile the IoTDB from source codes.
+
+FROM openjdk:11-jre-slim
 RUN apt update \
-  && apt install wget unzip lsof maven thrift-compiler=0.9.1-2.1 -y \
-  && wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz -O jdk11.tar.gz \
-  && tar -xzf jdk11.tar.gz \
-  && rm -rf jdk11.tar.gz \
-  && export JAVA_HOME=/jdk-11.0.2/ \
-  && export PATH="$JAVA_HOME/bin:$PATH" \
+  # procps is for `free` command
+  && apt install wget unzip lsof procps maven thrift-compiler=0.9.1-2.1 -y \
   && wget https://github.com/apache/incubator-iotdb/archive/rel/0.8.zip \
   && unzip 0.8.zip \
   && rm 0.8.zip \
   && cd incubator-iotdb-rel-0.8 \
   && mvn package -pl server,client -am -Papache-release -DskipTests -Dthrift.download-url="http://www.apache.org/licenses/LICENSE-2.0.txt" -Dthrift.exec.absolute.path="/usr/bin/thrift" \
   && cd target/ \
-  && unzip apache-iotdb-0.8.0-SNAPSHOT-incubating-bin.zip \
+  && unzip apache-iotdb-0.8.1-SNAPSHOT-incubating-bin.zip \
   && mkdir /iotdb \
-  && mv apache-iotdb-0.8.0-SNAPSHOT-incubating/* /iotdb/ \
+  && mv apache-iotdb-0.8.1-SNAPSHOT-incubating/* /iotdb/ \
   && cd ../../ \
   && mvn clean \
   && ls -lh ~/.m2 \
@@ -43,10 +41,9 @@ RUN apt update \
   && apt remove wget maven unzip thrift-compiler -y \
   && apt autoremove -y \
   && apt purge --auto-remove -y \
-  && apt clean -y 
-ENV JAVA_HOME  "/jdk-11.0.2"
-ENV PATH "$JAVA_HOME/bin:$PATH"
+  && apt clean -y
 EXPOSE 6667
+EXPOSE 31999
 VOLUME /iotdb/data
 VOLUME /iotdb/logs
 #ENTRYPOINT ["/iotdb/bin/start-server.sh"]
diff --git a/docker/src/main/binary/Dockerfile b/docker/src/main/binary/Dockerfile
new file mode 100644
index 0000000..39c10ca
--- /dev/null
+++ b/docker/src/main/binary/Dockerfile
@@ -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.
+#
+
+#This file allow you build an IoTDB image from binary files.
+
+
+FROM openjdk:11-jre-slim
+RUN apt update \
+  ## procps is for `free` command
+  && apt install wget unzip lsof procps -y \
+  && wget http://mirrors.tuna.tsinghua.edu.cn/apache/incubator/iotdb/0.8.1-incubating/apache-iotdb-0.8.1-incubating-bin.zip \
+  ##if you are not in China, please use the following url
+  #&& wget https://www-us.apache.org/dist/incubator/iotdb/0.8.1-incubating/apache-iotdb-0.8.1-incubating-bin.zip \
+  && unzip apache-iotdb-0.8.1-incubating-bin.zip \
+  && mv apache-iotdb-0.8.1-incubating/* /iotdb/ \
+  && rm apache-iotdb-0.8.1-incubating-bin.zip \
+  && 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
+#ENTRYPOINT ["/iotdb/sbin/start-server.sh"]