From c83a477c7a06dd81b585e6b51e7970d14b7ebc77 Mon Sep 17 00:00:00 2001 From: whz <303054730@qq.com> Date: Tue, 4 Jun 2024 09:00:34 +0800 Subject: [PATCH] fix --- docs/guides/spring-boot-docker.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guides/spring-boot-docker.md b/docs/guides/spring-boot-docker.md index 5e76179..868a458 100644 --- a/docs/guides/spring-boot-docker.md +++ b/docs/guides/spring-boot-docker.md @@ -11,13 +11,12 @@ WORKDIR /app # 将Gradle的配置文件复制到镜像中 COPY gradlew . -COPY gradle gradle COPY build.gradle . COPY settings.gradle . COPY src src # 构建应用 -RUN gradle bootJar +RUN /app/gradlew bootJar # 使用官方的Java运行时作为最终的运行环境 FROM openjdk:17-jdk-slim @@ -75,7 +74,8 @@ services: - "8080:8080" depends_on: - db - + environment: + - SPRING_PROFILES_ACTIVE=prod volumes: dbdata: ```