الملفات
graphhopper-docker-image-push/Dockerfile
Harel M 8a8ec2fbe0 Simplify and add url to graphhopper.sh (#14)
Fixes #11 Fixes #12

* All relevant changes

* Code review comments

* Small changes

* Code review fix

* Run the server as default action

* Remove unneeded commands from dockerfile

* Update graphhopper.sh

Adjust usage text
Use `exit 2` for usage errors

* Update README.md

Update the default JAVA_OPTS value according to the Dockerfile

* Add execute permissions

* Fix extra "

* Fix missing space

* Remove unwanted spaces

* Update README.md

Co-authored-by: zstadler <zeev.stadler@gmail.com>
2022-02-17 12:57:17 +02:00

32 أسطر
533 B
Docker

FROM maven:3.6.3-jdk-8 as build
RUN apt-get install -y wget
WORKDIR /graphhopper
COPY . .
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 ./config-example.yml ./
COPY --chmod=0755 ./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" ]