From f0ae23a5e30bfff3b1007f2c2e76278ebfa7e56d Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Thu, 29 Aug 2024 11:18:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 update.sh diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..4d6ee2b --- /dev/null +++ b/update.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# 拉取最新的git +git pull +# 构建新镜像 +docker-compose build +# 停止旧的容器 +docker-compose down +# 启动新的容器 +docker-compose up -d +# 查看容器运行情况 +docker ps +# 查看镜像 +docker images + +echo "更新完成,请确认容器版本正确,自行删除过期镜像。" \ No newline at end of file