You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/10/20 02:49:19 UTC

[iotdb] 13/13: 1c1d

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

haonan pushed a commit to branch 1c1d_dockertest
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 023ff5f7c46f7f26cdeb9f15ae1061fb2b0edee0
Author: HTHou <hh...@outlook.com>
AuthorDate: Thu Oct 20 10:46:43 2022 +0800

    1c1d
---
 .github/workflows/client-python.yml         |  2 +-
 docker/src/main/DockerCompose/start-1c1d.sh |  3 ++
 docker/src/main/Dockerfile-1c1d             | 52 +++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/client-python.yml b/.github/workflows/client-python.yml
index 9fb748fdaf..c92cd9f4ae 100644
--- a/.github/workflows/client-python.yml
+++ b/.github/workflows/client-python.yml
@@ -53,7 +53,7 @@ jobs:
         run: mvn -B clean install -pl distribution,client-py -am -DskipTests
       - name: Build IoTDB server docker image
         run: |
-          docker build . -f docker/src/main/Dockerfile-single -t "iotdb:dev"
+          docker build . -f docker/src/main/Dockerfile-1c1d -t "iotdb:dev"
           docker images
       - name: Install IoTDB python client requirements
         run: pip3 install -r client-py/requirements_dev.txt
diff --git a/docker/src/main/DockerCompose/start-1c1d.sh b/docker/src/main/DockerCompose/start-1c1d.sh
new file mode 100644
index 0000000000..a6501b2a3e
--- /dev/null
+++ b/docker/src/main/DockerCompose/start-1c1d.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+./confignode/sbin/start-confignode.sh &
+./datanode/sbin/start-datanode.sh &
\ No newline at end of file
diff --git a/docker/src/main/Dockerfile-1c1d b/docker/src/main/Dockerfile-1c1d
new file mode 100644
index 0000000000..59cc6debca
--- /dev/null
+++ b/docker/src/main/Dockerfile-1c1d
@@ -0,0 +1,52 @@
+#
+# 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.
+#
+
+# docker build context is the root path of the repository
+
+FROM openjdk:11-jre-slim
+
+ADD distribution/target/apache-iotdb-*-all-bin.zip /
+ADD docker/src/main/DockerCompose/start-1c1d.sh /
+
+RUN apt update \
+  && apt install lsof dos2unix procps unzip -y \
+  && unzip /apache-iotdb-*-bin.zip -d / \
+  && rm /apache-iotdb-*-bin.zip \
+  && mv /apache-iotdb-* /iotdb \
+  && mv /start-1c1d.sh /iotdb \
+  && apt remove unzip -y \
+  && apt autoremove -y \
+  && apt purge --auto-remove -y \
+  && apt clean -y \
+RUN dos2unix /iotdb/start-1c1d.sh
+RUN dos2unix /iotdb/confignode/sbin/start-confignode.sh
+RUN dos2unix /iotdb/confignode/sbin/../conf/confignode-env.sh
+RUN dos2unix /iotdb/datanode/sbin/start-datanode.sh
+RUN dos2unix /iotdb/datanode/sbin/../conf/datanode-env.sh
+EXPOSE 6667
+EXPOSE 31999
+EXPOSE 5555
+EXPOSE 8086
+EXPOSE 8181
+VOLUME /iotdb/datanode/data
+VOLUME /iotdb/datanode/logs
+VOLUME /iotdb/confignode/data
+VOLUME /iotdb/confignode/logs
+ENV PATH="/iotdb/datanode/sbin/:/iotdb/confignode/sbin/:/iotdb/tools/:${PATH}"
+ENTRYPOINT ["/iotdb/start-1c1d.sh"]