Closed muzammil786 closed 2 years ago
At this time, tern relies on docker to pull images, but we are moving away from that. Meanwhile, you can try using the --live
option on a running podman container like this:
mnt=`podman mount <container>`
tern report --live $mnt
I have a reference of how this works here: https://github.com/vmware-samples/containers-with-sboms/blob/main/base_container.sh
@muzammil786 We made a release recently that removed docker as a dependency for analyzing container images. Try:
sudo podman run --rm ternd report -i python:3.9-slim-buster > output.txt
after rebuilding the new Dockerfile
@nishakm I have got certificate validation error:
2022-01-06 11:27:58,117 - ERROR - skopeo - Error when downloading image: "b'time="2022-01-06T11:27:58Z" level=fatal msg="Error initializing source docker://<redact>: error pinging docker registry <private registry>: Get \\"https://<private registry>/v2/\\": x509: certificate signed by unknown authority"\n'"
How to send src-tls-verify=false option to skopeo or mount the cert dir? Is there any env variable I can pass to ignore cert validation?
@muzammil786 not at this time. We can probably modify the Dockerfile to create a volume mount. Or podman perhaps has some way of enabling this. I will take a look.
@nishakm Thanks. I have sorted this out by adding my registry into the base image.
COPY registries.conf /etc/containers/registries.conf
This line in the docker/Dockerfile helped me sail for now :-)
I am not able to reproduce this error when running sudo podman run --privileged --rm tern report -i python:3.9-slim-buster
. At this time, running podman as root and using --privileged
is the only way to get around the permission issues when creating device nodes (see #1115 ). I will close this issue.
How can we run turnd analysis using podman. I tried by creating the podman socket and using the command below:
sudo podman run --privileged --device /dev/fuse -v /run/podman/podman.sock:/var/run/docker.sock:z --rm ternd report -i python:3.9-slim-buster > output.txt
But it got errors like: