📜  docker ps grep container id - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:35.001000             🧑  作者: Mango

代码示例2
docker ps --filter status=running --filter publish="$PORT" --format "table {{.ID}}\t" | grep -m2 "" -o -n | tail -n1 | sed 's/2://g'