diff options
| author | Szymon Szukalski <szymon@skas.io> | 2024-07-25 11:56:13 +1000 |
|---|---|---|
| committer | Szymon Szukalski <szymon@skas.io> | 2024-07-25 11:56:13 +1000 |
| commit | 1df19fd955eb951f5d31fb205963b2f4e794c039 (patch) | |
| tree | 8de7fe9f20c069d4e9907a669e792d4e6c0f75ea /Dockerfile | |
| parent | bac742fe816a349d75db28fc44e5cca22776bb1a (diff) | |
Separate Docker Compose services for build, test, run
Refactor Docker Compose setup to include distinct services for building, testing,
and running the application.
Use separate Dockerfiles and configurations for each phase to isolate concerns and
improve workflow.
Quiet down the maven logs and set log levels to WARN so there is less noise in the
logs.
Update README file with information on running the project.
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,13 +1,13 @@ -# Stage 1: Build the JAR file +# Stage 1: BUILD FROM maven:3.8.5-openjdk-17 AS build WORKDIR /app COPY mvnw pom.xml ./ COPY .mvn .mvn COPY src src RUN chmod +x mvnw -RUN ./mvnw clean package -Dmaven.test.skip=true +RUN ./mvnw clean package -q -Dmaven.test.skip=true -# Stage 2: Run the JAR file +# Stage 2: RUN FROM openjdk:17-alpine RUN addgroup -S spring && adduser -S spring -G spring USER spring:spring |
