解决 Docker bash ps command not found

3 min read
root@51afd6b09af8:/# ps
bash: ps: command not found

ps is not installed in the base wheezy image. Try this from within the container:

apt-get update && apt-get install procps

or add the following line to the Dockerfile:

RUN apt-get update && apt-get install -y procps && rm -rf /var/lib/apt/lists/*