基础debian中没有pkill/pgrep :wheezy docker image
# docker run debian:wheezy pkill
System error: exec: "pkill": executable file not found in $PATH我不知道应该安装哪个包才能拥有这些工具
# docker run debian:wheezy cat /etc/apt/sources.list
deb http://httpredir.debian.org/debian wheezy main
deb http://httpredir.debian.org/debian wheezy-updates main
deb http://security.debian.org wheezy/updates main
# docker run debian:wheezy apt-get install procps
E: Unable to locate package procps发布于 2015-10-31 01:04:24
尝试在Dockerfile或容器中安装procps,然后提交它并启动新镜像
发布于 2015-10-31 03:21:41
解决了。我忘了
apt-get update在此之前
apt-get install procps在容器中
发布于 2015-10-31 00:02:04
您可以运行bash并亲自查看它:
$ docker run --rm -it debian:wheezy bash
在这里,您可以使用apt-get或aptitude并搜索包。我找不到pkill (它是Unix命令而不是GNU/Linux吗?)但是我猜你可以同时使用grep和kill来达到同样的效果。
https://stackoverflow.com/questions/33439895
复制相似问题