#!/bin/bash #descrition: #虚拟机销毁前删除容器 #The log output file:/var/log/docker_delete_debug.log # #$1:$LINENO #$2:ERROR/DEBUG/INFO #$3:MSG log(){ Time=`date "+%Y-%m-%d %H:%M:%S"` #currentTimeStamp=`date +%s` echo "$Time sh:docker-env-init.sh lineNo:$1 $2::$3" >> /var/log/docker_delete_debug.log } main() { true > /var/log/docker_delete_debug.log log "$LINENO" "DEBUG" "shell-start." #删除所有容器(label=namespace=app) log "$LINENO" "info" "Delete all contain the namespace=app container start." docker rm -f
撤回虚拟机前撤回容器
最新推荐文章于 2023-08-29 19:56:53 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)