- Remove dependency on github download - Add `github/build.sh` for local builds - Simplify gtaphhopper build - Simplify handling of `graphhopper.sh` and `config-example.yml`
30 أسطر
526 B
Docker
30 أسطر
526 B
Docker
FROM maven:3.6.3-jdk-8 as build
|
|
|
|
WORKDIR /graphhopper
|
|
|
|
COPY graphhopper .
|
|
|
|
RUN mvn clean install
|
|
|
|
FROM openjdk:11.0-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 .
|
|
|
|
COPY ./graphhopper.sh ./
|
|
|
|
VOLUME [ "/data" ]
|
|
|
|
EXPOSE 8989
|
|
|
|
HEALTHCHECK --interval=5s --timeout=3s CMD curl --fail http://localhost:8989/health || exit 1
|
|
|
|
ENTRYPOINT [ "./graphhopper.sh", "-c", "config-example.yml" ]
|