Kubernetes 1.20 moved from docker to CRI-O as container runtime. I have a scenario where my Jenkins run on kubernetes and does docker build my dockerfile .But the build breaks as docker daemon is not available now. I tried using Kaniko to build image but the downfall was once image is built i have no chance to scan the image before pushing to container registry. Once the image is built i have to push it immediately. How can i scan it before pushing to registry.
Current process:
- Jenkins runs on Kubernetes.
- Pulls code and does the docker build and tag it.
- Once docker build is successful will a scan the image for vulnerabilities.
- Once scan passes we push to the container registry.
With Kaniko i can do till step 2 later image goes away I am not able to find the image locally but i can push directly. And pull it and do scan. Any suggestions or alternatives so i can use my old dockerfiles build,scan and push without major changes