FROM openjdk:8-jdk-alpine

WORKDIR /app

# Install dos2unix for line-ending fixes
RUN apk add --no-cache bash dos2unix

# Copy everything
COPY . .

# Fix line endings for gradlew
RUN dos2unix ./gradlew && chmod +x ./gradlew

# Clean and run the Gradle app
CMD ["./gradlew", "clean", "run", "--no-daemon"]


