diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..15659d3912 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,46 @@ +FROM ubuntu:xenial + +LABEL maintainer="HugeGraph Docker Maintainers " + +ENV PKG_URL https://github.com/hugegraph/hugegraph/releases/download + +# 1. Install needed dependencies of GraphServer & RocksDB +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 clean \ + && rm -rf /var/lib/apt/lists/* + +# 2. Init HugeGraph Sever (speed up) +RUN set -e \ + && echo "192.30.253.112 github.com\n151.101.44.249 github.global.ssl.fastly.net" >> /etc/hosts \ + && mkdir -p /root/server \ + && curl -L -S $PKG_URL/v0.10.4/hugegraph-0.10.4.tar.gz -o /root/server.tar.gz \ + && tar xzf /root/server.tar.gz --strip-components 1 -C /root/server \ + && rm /root/server.tar.gz \ + && cd /root/server/ \ + && sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties \ + && sed -n '63p' ./bin/start-hugegraph.sh | grep "&" > /dev/null && sed -i 63{s/\&$/#/g} ./bin/start-hugegraph.sh \ + && sed -n '74p' ./bin/start-hugegraph.sh | grep "exit" > /dev/null && sed -i 74{s/^/#/g} ./bin/start-hugegraph.sh \ + && ./bin/init-store.sh + +# 3. Prepare for HugeGraph Studio +RUN set -e \ + && echo "192.30.253.112 github.com\n151.101.44.249 github.global.ssl.fastly.net" >> /etc/hosts \ + && mkdir -p /root/studio \ + && curl -L -S https://github.com/hugegraph/hugegraph-studio/releases/download/v0.10.0/hugegraph-studio-0.10.0.tar.gz -o /root/studio.tar.gz \ + && tar xzf /root/studio.tar.gz --strip-components 1 -C /root/studio \ + && rm /root/studio.tar.gz \ + && sed -i "s/^studio.server.host.*$/studio.server.host=0.0.0.0/g" /root/studio/conf/hugegraph-studio.properties \ + && sed -i "s/^graph.server.host.*$/graph.server.host=0.0.0.0/g" /root/studio/conf/hugegraph-studio.properties + +EXPOSE 8080 +EXPOSE 8088 +WORKDIR /root + +ENTRYPOINT ["./server/bin/start-hugegraph.sh"] diff --git a/hugegraph-dist/src/assembly/static/conf/hugegraph.properties b/hugegraph-dist/src/assembly/static/conf/hugegraph.properties index fd797ea51a..18543fa0c4 100644 --- a/hugegraph-dist/src/assembly/static/conf/hugegraph.properties +++ b/hugegraph-dist/src/assembly/static/conf/hugegraph.properties @@ -42,7 +42,7 @@ cassandra.password= # hbase backend config #hbase.hosts=localhost #hbase.port=2181 -#hbase.znode_parent=/hbsae +#hbase.znode_parent=/hbase #hbase.threads_max=64 # mysql backend config