mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-28 11:25:00 +00:00
- Add server/Dockerfile.dev for fast local builds (JRE-only, ~70MB) - Modify staging target to build JAR locally before Docker image - Update .dockerignore to allow target/ directory for Dockerfile.dev - Build time reduced from 17+ minutes to ~4 seconds - Reuses local Maven cache (~/.m2/repository) instead of downloading in Docker
19 lines
561 B
Text
19 lines
561 B
Text
# Development Dockerfile
|
|
# Expects pre-built JAR at skillhub-app/target/*.jar
|
|
# Used by: make staging (local development workflow)
|
|
FROM eclipse-temurin:21-jre-alpine
|
|
|
|
RUN addgroup -S app && adduser -S app -G app
|
|
WORKDIR /app
|
|
|
|
# Copy pre-built JAR from local build (relative to server/ directory)
|
|
COPY ./skillhub-app/target/*.jar app.jar
|
|
|
|
RUN chown -R app:app /app
|
|
USER app
|
|
|
|
EXPOSE 8080
|
|
HEALTHCHECK --interval=10s --timeout=3s \
|
|
CMD wget -qO- http://localhost:8080/actuator/health || exit 1
|
|
|
|
ENTRYPOINT ["java", "-XX:MaxRAMPercentage=75.0", "-jar", "app.jar"]
|