Closed shaolinyang2009 closed 1 year ago
This issue is stale because it has been labeled with inactivity.
We had the same requirement, solved using OCI layout scanning:
skopeo copy --src-creds $NEXUS_USER:$NEXUS_PASSWORD docker://$IMGWITHREPO oci://tmp/xxx
trivy image --input /tmp/xxx
The below seems to work as well. Of course it assumes docker being installed and the user having the rights to pull into the local registry:
docker image pull <private_registry>/<repo>:<image_tag>
trivy image <private_registry>/<repo>:<image_tag>
docker rmi <private_registry>/<repo>:<image_tag>
Any plans to support this directly from trivy?
Trivy should work with private registries. You need docker login <private_registry>
or TRIVY_USERNAME
and TRIVY_PASSWORD
.
https://aquasecurity.github.io/trivy/v0.36/docs/advanced/private-registries/
https://aquasecurity.github.io/trivy/v0.36/docs/advanced/private-registries/self/
support scanning on container image in popular public repository is good feature! Would you please extend this to support private repository as most users like us are using private repository?
E.g we are using Nexus server as our private repository, server link llke:
https://otaaplvlp05.,mycomparny.com:grpc_server.latest
thanks! shaolin