This is an automated email from the ASF dual-hosted git repository.
jin pushed a commit to branch docker-1.0.0
in repository
https://gitbox.apache.org/repos/asf/incubator-hugegraph-toolchain.git
The following commit(s) were added to refs/heads/docker-1.0.0 by this push:
new 55ad9c73 feat: support hubble release-1.0.0 to build in docker way
(#523)
55ad9c73 is described below
commit 55ad9c737ef688396634671e0064c2cea786261e
Author: Dandelion <[email protected]>
AuthorDate: Mon Sep 25 09:22:01 2023 +0800
feat: support hubble release-1.0.0 to build in docker way (#523)
* feat: support release-1.0.0 with docker
* fix: follow latest pom.xml
* fix: add the blank line
---
hugegraph-hubble/Dockerfile | 32 +++++++++++--------
hugegraph-hubble/hubble-dist/pom.xml | 60 +-----------------------------------
2 files changed, 20 insertions(+), 72 deletions(-)
diff --git a/hugegraph-hubble/Dockerfile b/hugegraph-hubble/Dockerfile
index 51b0aa24..4518d82f 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"]
diff --git a/hugegraph-hubble/hubble-dist/pom.xml
b/hugegraph-hubble/hubble-dist/pom.xml
index 9de40921..3db9ddd9 100644
--- a/hugegraph-hubble/hubble-dist/pom.xml
+++ b/hugegraph-hubble/hubble-dist/pom.xml
@@ -81,7 +81,7 @@
<echo file="${top.level.dir}/dist.sh">
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 @@
</filesets>
</configuration>
</plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${exec-maven-plugin.version}</version>
- <executions>
- <execution>
- <id>docker-build</id>
- <phase>package</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <skip>${docker.build.skip}</skip>
- <executable>docker</executable>
-
<workingDirectory>${project.basedir}</workingDirectory>
- <arguments>
- <argument>build</argument>
- <argument>--no-cache</argument>
- <argument>-t</argument>
-
<argument>${docker.hub}/${top.level.dir}:${docker.tag}</argument>
- <argument>-t</argument>
-
<argument>${docker.hub}/${top.level.dir}:latest</argument>
- <argument>${project.basedir}</argument>
- <argument>--file=../Dockerfile</argument>
- </arguments>
- </configuration>
- </execution>
- <execution>
- <id>docker-push</id>
- <phase>deploy</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <skip>${docker.push.skip}</skip>
- <environmentVariables>
- <DOCKER_BUILDKIT>1</DOCKER_BUILDKIT>
- </environmentVariables>
- <executable>docker</executable>
-
<workingDirectory>${project.basedir}</workingDirectory>
- <arguments>
- <argument>buildx</argument>
- <argument>build</argument>
- <argument>--platform</argument>
- <argument>linux/amd64,linux/arm64</argument>
- <argument>--no-cache</argument>
- <argument>--push</argument>
- <argument>-t</argument>
-
<argument>${docker.hub}/${top.level.dir}:${docker.tag}</argument>
- <argument>-t</argument>
-
<argument>${docker.hub}/${top.level.dir}:latest</argument>
- <argument>${project.basedir}</argument>
- <argument>--file=../Dockerfile</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>