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