简体   繁体   中英

Multiple Docker images filesystem scan

I'm trying to identify the most efficient and quickest way to scan multiple Docker images in my environment to determine if specific directory structures exist with each image.

Obviously I can exec into each image on an individual basis and manually check but I'm looking to automate this process.

I cannot think of a way to do this via scripting or api calls and I've not found any vendor software that offers a solution.

You can export each image to a tar file

https://docs.docker.com/engine/reference/commandline/export/

docker export red_panda > latest.tar

And then for each tar file, search for that directory

https://unix.stackexchange.com/questions/96410/search-for-a-file-inside-a-tar-gz-file-without-extracting-it-and-copy-the-result

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM