From 711cb4f9e853caed97793b52b60bf9b0ceb5eea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E4=B8=83=E5=B9=B4=E5=A4=8F?= <2098833867@qq.com> Date: Fri, 26 Apr 2024 01:20:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=B7=E8=B4=9D=20applicat?= =?UTF-8?q?ion.yml=20=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- docker_shell.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5e3f8c7..3ba700b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.authors="Lolosia" WORKDIR /app/ #复制fat.jar到镜像内app目录下 -ADD /home/lolosia-web/application.yml /app/ +ADD ./application.yml /app/ ADD ./build/libs/*-fat.jar /app/ RUN mv *-fat.jar app.jar diff --git a/docker_shell.sh b/docker_shell.sh index 4af476f..7278a11 100644 --- a/docker_shell.sh +++ b/docker_shell.sh @@ -29,6 +29,8 @@ if [ -n "$imageId" ];then fi echo "构建新版镜像: $name..." +# 拷贝 application.yml +cp /home/lolosia-web/application.yml ./ docker build -t "$name" . if [ -n "$imageId" ];then