Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adapt Dockerfile for new project structure #2344

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Changes from 2 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
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 <dev@hugegraph.apache.org>"

# 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"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also test docker stop & docker start here for server

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://hugegraph.feishu.cn/wiki/ThvlwPUHNiCpwPkjurkcw4mBnpf
tested.
Stop and start the server the data did not change.
But if i change the server image to the new version, it stuck when loading:
image

Loading