forked from freerouting/freerouting
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
29 lines (20 loc) · 874 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Stage 1: Build the application
FROM eclipse-temurin:21-jdk-jammy AS build
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Gradle build the application
RUN ./gradlew build
# Stage 2: Create the final image
FROM eclipse-temurin:21-jre-jammy
# Set the working directory in the container
WORKDIR /app
# Copy the built application from the build stage
COPY --from=build /app/build/libs/freerouting-executable.jar /app/freerouting-executable.jar
# Expose the port the app runs on
EXPOSE 37864
# Define a writable volume
VOLUME /mnt/freerouting
# Run the application
CMD ["java", "-jar", "/app/freerouting-executable.jar", "--api_server-enabled=true", "--gui-enabled=false", "--feature_flags-save_jobs=1", "--user_data_path=/mnt/freerouting", "[email protected]"]