ps command doesn't work in docker container

Yves Nicolas picture Yves Nicolas · Nov 17, 2014 · Viewed 129.9k times · Source

I want to do a ps command in a docker container derived from Debian official Docker hub repository:

$ docker run -ti debian:wheezy /bin/bash
root@51afd6b09af8:/# ps
bash: ps: command not found

Answer

user2105103 picture user2105103 · Nov 17, 2014

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

RUN apt-get update && apt-get install -y procps