author avatar

gautam

Tue Mar 12 2024

If using Podman (instead of Docker for Mac) and trivy for image scanning, trivy expects DOCKER_HOST env variable to be setup for scanning local images and fails unless DOCKER_HOST is pointing to the podman socket.

Fix:


$ export DOCKER_HOST="unix://$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}')"
$ trivy image image_name


#docker #devops