Przeglądaj źródła

refactor: 基础镜像更新

fanyanpeng 1 rok temu
rodzic
commit
a6413ba019
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      Dockerfile

+ 4 - 4
Dockerfile

@@ -1,17 +1,17 @@
 
 
 # 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
 WORKDIR /app
 # Copy the pom.xml and the project files to the container
 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
 
-ADD ./src src/
+COPY . .
 # 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
 FROM openjdk:17-jdk-slim