Updating ACR NAME For IMAGE
This commit is contained in:
11
.dockerignore
Normal file
11
.dockerignore
Normal file
@@ -0,0 +1,11 @@
|
||||
.git
|
||||
.gitea
|
||||
.github
|
||||
.devcontainer
|
||||
target
|
||||
build
|
||||
.gradle
|
||||
k6
|
||||
k8s
|
||||
overlays
|
||||
*.md
|
||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
# Spring PetClinic: build the jar with Maven, run it on a slim JRE.
|
||||
|
||||
# Plain Maven, not ./mvnw: the Maven wrapper jar is not committed.
|
||||
FROM maven:3.9-eclipse-temurin-17 AS build
|
||||
WORKDIR /src
|
||||
COPY pom.xml .
|
||||
RUN mvn -B -q dependency:go-offline
|
||||
COPY src ./src
|
||||
# Tests run in integration-test.yml. Format and checkstyle checks gate on style, not on a working image.
|
||||
RUN mvn -B -q package -DskipTests -Dspring-javaformat.skip=true -Dcheckstyle.skip=true
|
||||
|
||||
FROM eclipse-temurin:17-jre
|
||||
WORKDIR /app
|
||||
COPY --from=build /src/target/*.jar app.jar
|
||||
RUN useradd --system --uid 10001 app
|
||||
USER 10001
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["java", "-jar", "/app/app.jar"]
|
||||
Reference in New Issue
Block a user