Docker is a lightweight virtual machine container. To minimize the image, most of the official distributions were erased most the unnecessary system tools.
After pulled the fedora, I found command "ps" not found in default. ps can be found in package procps.
Install command is very easy:
dnf install procps -y
4 Comments
hans · April 19, 2022 at 05:34
In Docker images there’s oftentimes only ‘microdnf’ available instead of ‘dnf’.
Yu · April 28, 2022 at 01:58
That’s good to know!
I used to use alpine instead to shrink the image, and when one project must use fedora, centos, rhel etc., the base image could already super huge.
Donald · May 7, 2017 at 20:40
yu · May 9, 2017 at 04:27
@Donald The key point is you should install a package named as “procps”.
dnf (https://fedoraproject.org/wiki/DNF ) is only for fedora 22+.
if you are using RHEL, you may use yum instead, if you are using ubuntu, you may use “apt-get”