clouddreamai-cicd-setup 1.5.10 → 1.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -303,8 +303,11 @@ fi
|
|
|
303
303
|
|
|
304
304
|
# 停止并移除旧容器
|
|
305
305
|
echo "清理现有容器..."
|
|
306
|
+
# 先强制停止同名容器(无论是否由 docker-compose 管理)
|
|
307
|
+
docker container ls -q --filter "name=$APP_NAME" | xargs -r docker container stop || true
|
|
308
|
+
docker container ls -aq --filter "name=$APP_NAME" | xargs -r docker container rm -f || true
|
|
309
|
+
# 再执行 docker-compose down 清理网络等资源
|
|
306
310
|
docker-compose down --remove-orphans || true
|
|
307
|
-
docker container ls -a | grep "$APP_NAME" | awk '{print $1}' | xargs -r docker container rm -f
|
|
308
311
|
|
|
309
312
|
# 拉取镜像并启动容器
|
|
310
313
|
echo "尝试从 GitLab Container Registry 拉取镜像..."
|