Problem
I would like to do the following:
- Create an image with Trivy and Docker installed
- Run the container on Kubernetes
- Schedule a CRON job to pull all images from a container registry and to scan them, and output the results to stdout
Question
Is there a smart way to do this? Can you even install docker within a docker container?
I ended up doing the following:
An alternative to Skopeo would be to use the Registry HTTP API to download images as suggested by David Maze.