mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-16 12:55:50 +00:00
fix syntax
This commit is contained in:
parent
823f41c08d
commit
fff6bbf82f
1 changed files with 11 additions and 3 deletions
|
@ -1,17 +1,25 @@
|
||||||
# Build stage
|
# Build stage
|
||||||
FROM registry.access.redhat.com/ubi8/openjdk-17:latest as builder
|
FROM registry.access.redhat.com/ubi8/openjdk-17:latest as builder
|
||||||
|
|
||||||
|
# Install required packages
|
||||||
|
USER root
|
||||||
|
RUN microdnf install -y tar gzip
|
||||||
|
|
||||||
|
# Switch back to default user
|
||||||
|
USER 1001
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy Maven wrapper and POM
|
# Copy Maven wrapper and POM
|
||||||
COPY .mvn/ .mvn/
|
COPY --chown=1001:0 .mvn/ .mvn/
|
||||||
COPY mvnw pom.xml ./
|
COPY --chown=1001:0 mvnw pom.xml ./
|
||||||
|
RUN chmod +x mvnw
|
||||||
|
|
||||||
# Download dependencies
|
# Download dependencies
|
||||||
RUN ./mvnw dependency:go-offline
|
RUN ./mvnw dependency:go-offline
|
||||||
|
|
||||||
# Copy source code
|
# Copy source code
|
||||||
COPY src ./src
|
COPY --chown=1001:0 src ./src
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
RUN ./mvnw package -DskipTests
|
RUN ./mvnw package -DskipTests
|
||||||
|
|
Loading…
Reference in a new issue