* provide -DskipTests argument
* add multiplatform build for testing
* Revert "Revert "Add support for cross-platform builds including linux/amd64 and linux/arm64/v8 (#38)" (#39)"
This reverts commit 92d4cba7a9.
* remove test multiplatform build for PR
---------
Co-authored-by: Jason Baker <jbaker@gosonar.com>
31 أسطر
655 B
Docker
31 أسطر
655 B
Docker
FROM maven:3.9.5-eclipse-temurin-21 as build
|
|
|
|
WORKDIR /graphhopper
|
|
|
|
COPY graphhopper .
|
|
|
|
RUN mvn clean install -DskipTests
|
|
|
|
FROM eclipse-temurin:21.0.1_12-jre
|
|
|
|
ENV JAVA_OPTS "-Xmx1g -Xms1g"
|
|
|
|
RUN mkdir -p /data
|
|
|
|
WORKDIR /graphhopper
|
|
|
|
COPY --from=build /graphhopper/web/target/graphhopper*.jar ./
|
|
|
|
COPY graphhopper.sh graphhopper/config-example.yml ./
|
|
|
|
# Enable connections from outside of the container
|
|
RUN sed -i '/^ *bind_host/s/^ */&# /p' config-example.yml
|
|
|
|
VOLUME [ "/data" ]
|
|
|
|
EXPOSE 8989 8990
|
|
|
|
HEALTHCHECK --interval=5s --timeout=3s CMD curl --fail http://localhost:8989/health || exit 1
|
|
|
|
ENTRYPOINT [ "./graphhopper.sh", "-c", "config-example.yml" ]
|