https://github.com/dharmit/package-list-scanner
An atomic scanner that lists packages installed by package manager like yum, pip, npm and gem
https://github.com/dharmit/package-list-scanner
Last synced: 8 months ago
JSON representation
An atomic scanner that lists packages installed by package manager like yum, pip, npm and gem
- Host: GitHub
- URL: https://github.com/dharmit/package-list-scanner
- Owner: dharmit
- Created: 2017-01-26T11:27:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-27T05:21:58.000Z (over 9 years ago)
- Last Synced: 2025-02-10T05:41:45.971Z (over 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Atomic scanner: rpm-list-scanner
--------------------------------
This is a container image scanner based on `atomic scan`. The goal of the
scanner is to list the packages installed in a container image.
Steps to use:
- Pull container image:
```
$ docker pull registry.centos.org/dharmit/package-list-scanner
```
- Install it using `atomic`:
```
$ atomic install registry.centos.org/dharmit/package-list-scanner
```
- Mount the image's rootfs because by default `atomic scan` would mount it in
read-only mode but we need read-write capability:
```
$ atomic mount -o rw registry.centos.org/centos/centos /mnt
```
Make sure you have `centos:centos7` available locally before you try to mount
- List rpm packages in CentOS based image:
```
$ atomic scan --scanner package-list-scanner --rootfs=/mnt registry.centos.org/centos/centos
```
At the moment, it's kinda hard-coded to use `/mnt` for mounting container's
rootfs. If you opt to use a different directory instead, you might need to make
changes to `rpm-list.sh` script.
- List pip packages in CentOS based image:
```
$ IMAGE_NAME= atomic scan --scanner pacakge-list-scanner --scan_type pip-list
```
Similarly for list of packages installed via npm (global packages) and gem,
replace `pip-list` in `--scan_type` for above command with `npm-list` and
`gem-list` respectively.