Skip to content

Commit d1c73a1

Browse files
committed
remove -x test flag in dockerfiles
1 parent 9ca0b36 commit d1c73a1

3 files changed

Lines changed: 33 additions & 52 deletions

File tree

auth-service/Dockerfile

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
11
# ---- Stage 1: Build the application ----
22
FROM eclipse-temurin:24-jdk AS builder
3-
4-
# Set working directory inside container
53
WORKDIR /app
64

7-
# Copy Gradle wrapper and configuration first to leverage Docker cache
8-
COPY gradlew gradlew
9-
COPY gradle gradle
10-
COPY build.gradle* .
11-
COPY settings.gradle* .
5+
COPY gradlew .
6+
COPY gradle gradle/
7+
COPY build.gradle .
8+
COPY settings.gradle .
129

13-
# Pre-download Gradle dependencies to prevent timeouts later
14-
RUN chmod +x gradlew && ./gradlew --no-daemon build -x test || true
10+
# Download dependencies (for caching)
11+
RUN chmod +x gradlew && ./gradlew --no-daemon dependencies
1512

16-
# Now copy the full project
13+
# Copy full project source
1714
COPY . .
1815

19-
# Build the application (will reuse downloaded Gradle distribution)
20-
RUN ./gradlew clean build -x test --no-daemon
16+
# Build application and run tests
17+
RUN ./gradlew clean build --no-daemon
2118

2219
# ---- Stage 2: Create a minimal runtime image ----
2320
FROM eclipse-temurin:24-jre
24-
25-
# Set working directory
2621
WORKDIR /app
2722

28-
# Copy built JAR from the builder stage
23+
# Copy built JAR from builder stage
2924
COPY --from=builder /app/build/libs/*.jar app.jar
3025

31-
# Expose the port your service runs on
3226
EXPOSE 8083
3327

34-
# Run the JAR
35-
ENTRYPOINT ["java", "-jar", "app.jar"]
28+
ENTRYPOINT ["java", "-jar", "app.jar"]

flashcard-service/Dockerfile

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
11
# ---- Stage 1: Build the application ----
22
FROM eclipse-temurin:24-jdk AS builder
3-
4-
# Set working directory inside container
53
WORKDIR /app
64

7-
# Copy Gradle wrapper and configuration first to leverage Docker cache
8-
COPY gradlew gradlew
9-
COPY gradle gradle
10-
COPY build.gradle* .
11-
COPY settings.gradle* .
5+
COPY gradlew .
6+
COPY gradle gradle/
7+
COPY build.gradle .
8+
COPY settings.gradle .
129

13-
# Pre-download Gradle dependencies to prevent timeouts later
14-
RUN chmod +x gradlew && ./gradlew --no-daemon build -x test || true
10+
# Download dependencies (for caching)
11+
RUN chmod +x gradlew && ./gradlew --no-daemon dependencies
1512

16-
# Now copy the full project
13+
# Copy full project source
1714
COPY . .
1815

19-
# Clean + build the JAR without running tests
20-
RUN ./gradlew clean build -x test --no-daemon
16+
# Build application and run tests
17+
RUN ./gradlew clean build --no-daemon
2118

2219
# ---- Stage 2: Create a minimal runtime image ----
2320
FROM eclipse-temurin:24-jre
24-
25-
# Set working directory
2621
WORKDIR /app
2722

28-
# Copy built JAR from the builder stage
23+
# Copy built JAR from builder stage
2924
COPY --from=builder /app/build/libs/*.jar app.jar
3025

3126
EXPOSE 8082
32-
ENTRYPOINT ["java", "-jar", "app.jar"]
27+
ENTRYPOINT ["java", "-jar", "app.jar"]

quiz-service/Dockerfile

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
11
# ---- Stage 1: Build the application ----
22
FROM eclipse-temurin:24-jdk AS builder
3-
4-
# Set working directory inside container
53
WORKDIR /app
64

7-
# Copy Gradle wrapper and configuration first to leverage Docker cache
8-
COPY gradlew gradlew
9-
COPY gradle gradle
10-
COPY build.gradle* .
11-
COPY settings.gradle* .
5+
COPY gradlew .
6+
COPY gradle gradle/
7+
COPY build.gradle .
8+
COPY settings.gradle .
129

13-
# Pre-download Gradle dependencies to prevent timeouts later
14-
RUN chmod +x gradlew && ./gradlew --no-daemon build -x test || true
10+
# Download dependencies (for caching)
11+
RUN chmod +x gradlew && ./gradlew --no-daemon dependencies
1512

16-
# Now copy the full project
13+
# Copy full project source
1714
COPY . .
1815

19-
# Build the application (will reuse downloaded Gradle distribution)
20-
RUN ./gradlew clean build -x test --no-daemon
16+
# Build application and run tests
17+
RUN ./gradlew clean build --no-daemon
2118

2219
# ---- Stage 2: Create a minimal runtime image ----
2320
FROM eclipse-temurin:24-jre
24-
25-
# Set working directory
2621
WORKDIR /app
2722

28-
# Copy built JAR from the builder stage
23+
# Copy built JAR from builder stage
2924
COPY --from=builder /app/build/libs/*.jar app.jar
3025

31-
# Expose the service port
3226
EXPOSE 8081
3327

34-
# Run the application
35-
ENTRYPOINT ["java", "-jar", "app.jar"]
28+
ENTRYPOINT ["java", "-jar", "app.jar"]

0 commit comments

Comments
 (0)