|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 3 | +# or more contributor license agreements. See the NOTICE file |
| 4 | +# distributed with this work for additional information |
| 5 | +# regarding copyright ownership. The ASF licenses this file |
| 6 | +# to you under the Apache License, Version 2.0 (the |
| 7 | +# "License"); you may not use this file except in compliance |
| 8 | +# with the License. You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, |
| 13 | +# software distributed under the License is distributed on an |
| 14 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | +# KIND, either express or implied. See the License for the |
| 16 | +# specific language governing permissions and limitations |
| 17 | +# under the License. |
| 18 | +# |
| 19 | + |
| 20 | +FROM openjdk:11-jre-slim |
| 21 | +RUN apt update \ |
| 22 | + # procps is for `free` command |
| 23 | + && apt install wget unzip lsof procps -y \ |
| 24 | + && wget https://downloads.apache.org/iotdb/0.13.0/apache-iotdb-0.13.0-cluster-bin.zip \ |
| 25 | + # if you are in China, use the following URL |
| 26 | + #&& wget https://mirrors.tuna.tsinghua.edu.cn/apache/iotdb/0.13.0/apache-iotdb-0.13.0-cluster-bin.zip \ |
| 27 | + && unzip apache-iotdb-0.13.0-cluster-bin.zip \ |
| 28 | + && rm apache-iotdb-0.13.0-cluster-bin.zip \ |
| 29 | + && mv apache-iotdb-0.13.0-cluster-bin /iotdb \ |
| 30 | + && apt remove wget unzip -y \ |
| 31 | + && apt autoremove -y \ |
| 32 | + && apt purge --auto-remove -y \ |
| 33 | + && apt clean -y \ |
| 34 | + # modify the seeds in configuration file |
| 35 | + && sed -i '/^seed_nodes/cseed_nodes=127.0.0.1:9003' /iotdb/conf/iotdb-cluster.properties \ |
| 36 | + && sed -i '/^default_replica_num/cdefault_replica_num=1' /iotdb/conf/iotdb-cluster.properties |
| 37 | + |
| 38 | +# rpc port |
| 39 | +EXPOSE 6667 |
| 40 | +# JMX port |
| 41 | +EXPOSE 31999 |
| 42 | +# sync port |
| 43 | +EXPOSE 5555 |
| 44 | +# monitor port |
| 45 | +EXPOSE 8181 |
| 46 | +# internal meta port |
| 47 | +EXPOSE 9003 |
| 48 | +# internal data port |
| 49 | +EXPOSE 40010 |
| 50 | +VOLUME /iotdb/data |
| 51 | +VOLUME /iotdb/logs |
| 52 | +ENV PATH="/iotdb/sbin/:/iotdb/tools/:${PATH}" |
| 53 | +ENTRYPOINT ["/iotdb/sbin/start-node.sh"] |
0 commit comments