Files
iot-test-platform/Dockerfile
2025-12-12 11:45:17 +08:00

25 lines
653 B
Docker

# Build Stage (Optional, if you want to build inside Docker)
# FROM maven:3.9-eclipse-temurin-17 AS build
# WORKDIR /app
# COPY pom.xml .
# COPY src ./src
# RUN mvn clean package -DskipTests
# Run Stage
FROM eclipse-temurin:17-jre-alpine
WORKDIR /app
VOLUME /tmp
# Copy the built jar (Assuming you built it locally with 'mvn package' or in CI)
# If using the build stage above, change to: COPY --from=build /app/target/*.jar app.jar
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
# Expose Web Port and JT808 TCP Port
EXPOSE 8080
EXPOSE 20048
# Run the application
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]