diff --git a/Dockerfile b/Dockerfile index ff319f5..e6c45be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM eclipse-temurin:17 as builder -WORKDIR /app - COPY . /app +WORKDIR /app + RUN /app/mvnw -Dmaven.test.skip=true clean package FROM eclipse-temurin:17 @@ -16,6 +16,8 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime # 将指定目录下的jar包复制到docker容器的/目录下 COPY --from=builder /app/playedu-api/target/playedu-api.jar /app/app.jar +RUN chmod +x /app/app.jar + # 声明服务运行在8080端口 EXPOSE 9898