NVIDIA / enroot

A simple yet powerful tool to turn traditional container/OS images into unprivileged sandboxes.
Apache License 2.0
648 stars 94 forks source link

Listing installed packages inside an enroot container #94

Closed christina-winkler closed 3 years ago

christina-winkler commented 3 years ago

Hi,

I want to customize my Enroot container and am currently facing the problem of listing the packages that I have already installed inside it. Is there any command to quickly view those ?

Thanks in advance ! Christina

flx42 commented 3 years ago

It depends on the Linux distribution you have in the container, so it's not specific to enroot. For example on Ubuntu:

# dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version                      Architecture Description
+++-=======================-============================-============-========================================================================
ii  adduser                 3.118ubuntu2                 all          add and remove users and groups
ii  apt                     2.0.6                        amd64        commandline package manager
ii  base-files              11ubuntu5.4                  amd64        Debian base system miscellaneous files
ii  base-passwd             3.5.47                       amd64        Debian base system master password and group files
ii  bash                    5.0-6ubuntu1.1               amd64        GNU Bourne Again SHell
[...]
aavbsouza commented 3 years ago

For yum based distros the command would be yum list installed. The nvidia folks also developed an excelent library to build HPC containers easily hpccm.

3XX0 commented 3 years ago

Closing since this more of a distro question rather than an enroot issue.