From fe9e354e12b903300606d897a6b7082f20d2eeab Mon Sep 17 00:00:00 2001 From: Dandelion Date: Fri, 22 Sep 2023 12:12:35 +0800 Subject: [PATCH 1/4] feat: support release-1.0.0 with docker --- hugegraph-hubble/Dockerfile | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/hugegraph-hubble/Dockerfile b/hugegraph-hubble/Dockerfile index 51b0aa24e..287968e73 100644 --- a/hugegraph-hubble/Dockerfile +++ b/hugegraph-hubble/Dockerfile @@ -5,7 +5,9 @@ # 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 +# +# 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. @@ -13,22 +15,26 @@ # limitations under the License. # -FROM ubuntu:xenial +FROM maven:3.9.0-eclipse-temurin-11 AS build RUN set -x \ && apt-get -q update \ - && apt-get -q install -y --no-install-recommends --no-install-suggests \ - curl \ - lsof \ - g++ \ - gcc \ - openjdk-8-jdk \ + && apt-get install -y nodejs npm \ + && npm install --global yarn \ && apt-get clean -ENV HUBBLE_HOME /opt/hugegraph-hubble -WORKDIR ${HUBBLE_HOME} +COPY . /pkg +WORKDIR /pkg -COPY ./hugegraph-hubble $HUBBLE_HOME -EXPOSE 8088 +RUN set -x \ + && cd /pkg/hugegraph-hubble/ \ + && mvn package -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true -ENTRYPOINT ["./bin/start-hubble.sh"] + +FROM openjdk:11-slim + +COPY --from=build /pkg/hugegraph-hubble/apache-hugegraph-hubble-incubating-*/ /hubble +WORKDIR /hubble/ + +EXPOSE 8088 +ENTRYPOINT ["./bin/start-hubble.sh", "-f true"] \ No newline at end of file From d46c4be3f1122cf2a3b73fb63391e5ed1e68ef43 Mon Sep 17 00:00:00 2001 From: Dandelion Date: Fri, 22 Sep 2023 13:59:03 +0800 Subject: [PATCH 2/4] fix: follow latest pom.xml --- hugegraph-hubble/hubble-dist/pom.xml | 60 +--------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/hugegraph-hubble/hubble-dist/pom.xml b/hugegraph-hubble/hubble-dist/pom.xml index 9de409213..3db9ddd93 100644 --- a/hugegraph-hubble/hubble-dist/pom.xml +++ b/hugegraph-hubble/hubble-dist/pom.xml @@ -81,7 +81,7 @@ cd ${hubble-fe.dir} || exit 1 export CI=false - yarn install && yarn build || exit 1 + yarn install --network-timeout 600000 && yarn build || exit 1 echo -e "Hubble-FE build successfully.\n" cd ${top.level.dir} && pwd @@ -120,64 +120,6 @@ - - org.codehaus.mojo - exec-maven-plugin - ${exec-maven-plugin.version} - - - docker-build - package - - exec - - - ${docker.build.skip} - docker - ${project.basedir} - - build - --no-cache - -t - ${docker.hub}/${top.level.dir}:${docker.tag} - -t - ${docker.hub}/${top.level.dir}:latest - ${project.basedir} - --file=../Dockerfile - - - - - docker-push - deploy - - exec - - - ${docker.push.skip} - - 1 - - docker - ${project.basedir} - - buildx - build - --platform - linux/amd64,linux/arm64 - --no-cache - --push - -t - ${docker.hub}/${top.level.dir}:${docker.tag} - -t - ${docker.hub}/${top.level.dir}:latest - ${project.basedir} - --file=../Dockerfile - - - - - From 8715143f58df9d3879daa0129e95f915c77a0c7a Mon Sep 17 00:00:00 2001 From: Dandelion Date: Fri, 22 Sep 2023 15:22:37 +0800 Subject: [PATCH 3/4] fix: add the blank line --- hugegraph-hubble/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugegraph-hubble/Dockerfile b/hugegraph-hubble/Dockerfile index 287968e73..4518d82f9 100644 --- a/hugegraph-hubble/Dockerfile +++ b/hugegraph-hubble/Dockerfile @@ -37,4 +37,4 @@ COPY --from=build /pkg/hugegraph-hubble/apache-hugegraph-hubble-incubating-*/ /h WORKDIR /hubble/ EXPOSE 8088 -ENTRYPOINT ["./bin/start-hubble.sh", "-f true"] \ No newline at end of file +ENTRYPOINT ["./bin/start-hubble.sh", "-f true"] From b39b85448a75603d6006ee256a7e29f8b1ee24b7 Mon Sep 17 00:00:00 2001 From: Dandelion Date: Mon, 6 Nov 2023 21:10:40 +0800 Subject: [PATCH 4/4] feat: support docker for loader-1.0.0 --- hugegraph-loader/Dockerfile | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 hugegraph-loader/Dockerfile diff --git a/hugegraph-loader/Dockerfile b/hugegraph-loader/Dockerfile new file mode 100644 index 000000000..d7ba0834d --- /dev/null +++ b/hugegraph-loader/Dockerfile @@ -0,0 +1,49 @@ +# +# 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 maven:3.9.0-eclipse-temurin-11 AS build + +COPY . /pkg +WORKDIR /pkg + +RUN set -x \ + && mvn install -pl hugegraph-client,hugegraph-loader -am -Dmaven.javadoc.skip=true -DskipTests -ntp + +RUN set -x \ + && cd /pkg/hugegraph-loader/ \ + && echo "$(ls)" \ + && mvn clean package -DskipTests + +FROM openjdk:11-slim + +COPY --from=build /pkg/hugegraph-loader/apache-hugegraph-loader-incubating-*/ /loader +WORKDIR /loader/ + +RUN set -x \ + && apt-get -q update \ + && apt-get -q install -y --no-install-recommends --no-install-suggests \ + dumb-init \ + procps \ + curl \ + lsof \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +VOLUME /loader + +ENTRYPOINT ["/usr/bin/dumb-init", "--"] +CMD [ "/bin/bash" ]