Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions hugegraph-hubble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,36 @@
# 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.
# See the License for the specific language governing permissions and
# 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"]
60 changes: 1 addition & 59 deletions hugegraph-hubble/hubble-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<echo file="${top.level.dir}/dist.sh">
cd ${hubble-fe.dir} || exit 1
export CI=false
yarn install &amp;&amp; yarn build || exit 1
yarn install --network-timeout 600000 &amp;&amp; yarn build || exit 1
echo -e "Hubble-FE build successfully.\n"

cd ${top.level.dir} &amp;&amp; pwd
Expand Down Expand Up @@ -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>
49 changes: 49 additions & 0 deletions hugegraph-loader/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]