当我尝试运行ps -ef|grep process
命令时,jenkins管道中出现错误消息:
ps: unrecognized option: p
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.
Usage: ps [-o COL1,COL2=HEADER]
Show list of processes
-o COL1,COL2=HEADER Select columns for displayI have Jenkins version 2.135 and
我有BusyBox v1.27.2
有人可以告诉我如何在不安装ps -ef|grep process
的情况下避免alpine image
的错误吗
答案 0 :(得分:0)
您可以使用
docker exec -it container_name ps -ef | grep process
或者您可以通过运行ps -ef | grep process
docker exec -it container_name /bin/bash