Sfoglia il codice sorgente

refactor: 基础镜像更新

fanyanpeng 2 anni fa
parent
commit
a6413ba019
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      Dockerfile

+ 4 - 4
Dockerfile

@@ -1,17 +1,17 @@
 
 
 
 
 # Use an official Maven image as the base image
 # Use an official Maven image as the base image
-FROM maven:3.8.5-openjdk-17-slim AS build
+FROM maven:3.8.5-openjdk-17 AS build
 # Set the working directory in the container
 # Set the working directory in the container
 WORKDIR /app
 WORKDIR /app
 # Copy the pom.xml and the project files to the container
 # Copy the pom.xml and the project files to the container
 ADD ./pom.xml pom.xml
 ADD ./pom.xml pom.xml
-ADD settings.xml /usr/share/maven/ref/
+ADD settings.xml  /usr/share/maven/conf/settings.xml
 RUN  mvn install -Dmaven.repo.local=./.m2
 RUN  mvn install -Dmaven.repo.local=./.m2
 
 
-ADD ./src src/
+COPY . .
 # Build the application using Maven
 # Build the application using Maven
-RUN mvn clean package -DskipTests  -Dmaven.repo.local=./.m2
+RUN mvn clean package -DskipTests
 
 
 # Use an official OpenJDK image as the base image
 # Use an official OpenJDK image as the base image
 FROM openjdk:17-jdk-slim
 FROM openjdk:17-jdk-slim