Skip to content

Commit 1fc19b6

Browse files
committed
fix: use non-Alpine Java 23 base image for better compatibility
- Change from eclipse-temurin:23-jre-alpine to eclipse-temurin:23-jre - Update user creation commands for Debian-based image - Replace wget with curl for health check - Fixes Fly.io build failures due to Alpine image unavailability This resolves deployment issues while maintaining Java 23 compatibility.
1 parent ef3cca0 commit 1fc19b6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ COPY src ./src
1111
RUN mvn clean package -DskipTests
1212

1313
# Runtime stage
14-
FROM eclipse-temurin:23-jre-alpine
14+
FROM eclipse-temurin:23-jre
1515
WORKDIR /app
1616

1717
# Create non-root user
18-
RUN addgroup -S spring && adduser -S spring -G spring
18+
RUN groupadd -r spring && useradd -r -g spring spring
1919
USER spring:spring
2020

2121
# Copy JAR from build stage
2222
COPY --from=build /app/target/*.jar app.jar
2323

2424
# Health check
2525
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
26-
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1
26+
CMD curl -f http://localhost:8080/actuator/health || exit 1
2727

2828
# Expose port
2929
EXPOSE 8080

0 commit comments

Comments
 (0)