Skip to content

Commit

Permalink
add with hubble dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
coderzc committed Dec 5, 2022
1 parent 8e50f71 commit 84abe4f
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
51 changes: 51 additions & 0 deletions DockerfileWithHubble
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#
# 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 openjdk:11-slim

LABEL maintainer="HugeGraph Docker Maintainers <[email protected]>"

ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vm"

COPY . /hugegraph/hugegraph-server
WORKDIR /hugegraph/hugegraph-server

# 1. Install environment
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

# 2. Init HugeGraph Sever
RUN set -e \
&& cd /hugegraph/hugegraph-server/ \
&& sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties \
&& ./bin/init-store.sh

# 3. Init HugeGraph Hubble
RUN set -e \
&& cd /hugegraph/hugegraph-server/hugegraph-hubble \
&& sed -i "s/^hubble.host.*$/hubble.host=http:\/\/0.0.0.0:8080/g" ./conf/hugegraph-hubble.properties \

EXPOSE 8080 8088

ENTRYPOINT [ "/usr/bin/dumb-init", "--" ]
CMD ["hugegraph-hubble/bin/start-hubble.sh && bin/start-hugegraph.sh"]
8 changes: 7 additions & 1 deletion hugegraph-dist/src/assembly/travis/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ CONTEXT_PATH=$(mvn -f "${PROJECT_POM_PATH}" -q -N \
-Dexec.executable='echo' -Dexec.args='${final.name}')
CONTEXT_PATH="${PROJECT_PATH}/${CONTEXT_PATH}"

docker build -t $1 $CONTEXT_PATH -f $PROJECT_PATH/Dockerfile
if [ -n "$2" ]; then
wget $2 -O /tmp/hugegraph-hubble.tar.gz
tar -zxf /tmp/hugegraph-hubble.tar.gz -C $CONTEXT_PATH
docker build -t $1 $CONTEXT_PATH -f $PROJECT_PATH/DockerfileWithHubble
else
docker build -t $1 $CONTEXT_PATH -f $PROJECT_PATH/Dockerfile
fi

0 comments on commit 84abe4f

Please sign in to comment.