Skip to content

Commit

Permalink
feat: adapt Dockerfile for new project structure (#2344)
Browse files Browse the repository at this point in the history
* feat: dockerfile adapt the project structure

* change the version

---------

Co-authored-by: imbajin <[email protected]>
  • Loading branch information
aroundabout and imbajin authored Nov 13, 2023
1 parent a6e1f23 commit 25301f6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Dockerfile → hugegraph-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ RUN mvn package -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l
# 2nd stage: runtime env
FROM openjdk:11-slim
# TODO: get the version from the pom.xml
ENV version=1.0.0
COPY --from=build /pkg/apache-hugegraph-incubating-$version/ /hugegraph
ENV version=1.5.0
COPY --from=build /pkg/hugegraph-server/apache-hugegraph-incubating-$version/ /hugegraph-server
LABEL maintainer="HugeGraph Docker Maintainers <[email protected]>"

# TODO: use g1gc or zgc as default
ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vm" \
HUGEGRAPH_HOME="hugegraph"

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

# 1. Install environment
RUN set -x \
Expand All @@ -50,17 +50,17 @@ RUN set -x \

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

# 3. Init docker script
COPY hugegraph-dist/docker/scripts/remote-connect.groovy ./scripts
COPY hugegraph-dist/docker/scripts/detect-storage.groovy ./scripts
COPY hugegraph-dist/docker/docker-entrypoint.sh .
COPY hugegraph-server/hugegraph-dist/docker/scripts/remote-connect.groovy ./scripts
COPY hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy ./scripts
COPY hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh .
RUN chmod 755 ./docker-entrypoint.sh

EXPOSE 8080
VOLUME /hugegraph
VOLUME /hugegraph-server

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["./docker-entrypoint.sh"]

0 comments on commit 25301f6

Please sign in to comment.