Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install pgrep/pkill on debian wheezy docker image

Tags:

docker

debian

There is no pkill/pgrep in the base debian:wheezy docker image

# docker run debian:wheezy pkill 
System error: exec: "pkill": executable file not found in $PATH

and I can't figure out which package should I install to have these tools

# 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
like image 663
Vitaly P Avatar asked Oct 30 '15 15:10

Vitaly P


2 Answers

Solved. I forgot about

apt-get update

before

apt-get install procps

in the container

like image 95
Vitaly P Avatar answered Nov 03 '22 01:11

Vitaly P


try installing procps in your Dockerfile, or in your container, then commit it and launch the new image

like image 26
user2915097 Avatar answered Nov 03 '22 01:11

user2915097