-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adapt Dockerfile for new project structure (#2344)
* feat: dockerfile adapt the project structure * change the version --------- Co-authored-by: imbajin <[email protected]>
- Loading branch information
1 parent
a6e1f23
commit 25301f6
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 \ | ||
|
@@ -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"] |