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