Giter VIP home page Giter VIP logo

Comments (10)

kolaente avatar kolaente commented on May 18, 2024 2

@knqyf263 @masahiro331 Great, thanks!

from trivy.

030 avatar 030 commented on May 18, 2024
user@host:~$ docker run -it -v /var/run/docker.sock:/var/run/docker.sock knqyf263/trivy:0.0.13 utrecht/bcbsn:2.0.0
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"utrecht/bcbsn:2.0.0\": stat utrecht/bcbsn:2.0.0: no such file or directory": unknown.

The image exists on the hosts.

from trivy.

masahiro331 avatar masahiro331 commented on May 18, 2024

@030

Change dockerfile CMD to ENTRYPOINT

Please use this command.

docker run -v /var/run/docker.sock:/var/run/docker.sock knqyf263/trivy:0.0.14 utrecht/bcbsn:2.0.0

If you use macOS, you can use local cache below command.

docker run -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/Library/Caches:/root/.cache/ knqyf263/trivy:0.0.14 utrecht/bcbsn:2.0.0

from trivy.

knqyf263 avatar knqyf263 commented on May 18, 2024

@kolaente You can use Trivy in a docker container. Please specify knqyf263/trivy:latest or knqyf263/trivy:0.0.14 as an image name.
https://cloud.docker.com/u/knqyf263/repository/docker/knqyf263/trivy

from trivy.

030 avatar 030 commented on May 18, 2024

The analysis works now:

[user@localhost ~]$ docker run -v /var/run/docker.sock:/var/run/docker.sock knqyf263/trivy:0.0.14 utrecht/bcbsn:2.0.0
Unable to find image 'knqyf263/trivy:0.0.14' locally
0.0.14: Pulling from knqyf263/trivy
e7c96db7181b: Pull complete 
a62117a94668: Pull complete 
fd4ece22b6c2: Pull complete 
Digest: sha256:93b57cd8593c7a0c334b542951bdc62f16f2afdcc2e353ac5e2d532ba6d0f3ee
Status: Downloaded newer image for knqyf263/trivy:0.0.14
2019-05-19T10:25:32.818Z	INFO	Updating vulnerability database...
2019-05-19T10:28:24.555Z	INFO	Updating NVD data...
 122550 / 122550  100.00% 2m18ss
2019-05-19T10:30:43.000Z	INFO	Updating Alpine data...
 11119 / 11119  100.00% 11s1s
2019-05-19T10:30:55.245Z	INFO	Updating RedHat data...
 19426 / 19426  100.00% 24s01s
2019-05-19T10:31:19.809Z	INFO	Updating Debian data...
 27809 / 27809  100.00% 30s01s
2019-05-19T10:31:50.674Z	INFO	Updating Debian OVAL data...
 59642 / 59642  100.00% 2m17ss
2019-05-19T10:34:07.811Z	INFO	Updating Ubuntu data...
 30191 / 30191  100.00% 1m13ss
2019-05-19T10:35:23.654Z	FATAL	error in image scan: failed to scan image: failed to analyze OS: Unknown OS

from trivy.

030 avatar 030 commented on May 18, 2024

When I run it for the second time, the scan takes still a while. What folder should be mounted to prevent this?

from trivy.

masahiro331 avatar masahiro331 commented on May 18, 2024

@030
Create DB at the first start, and use cache after the second.
To use cache with docker, mount the cache directory.Create DB at the first start, and use cache after the second.

Example for macOS:

docker run -v $HOME/Library/Caches:/root/.cache/ knqyf263/trivy:0.0.14 utrecht/bcbsn:2.0.0

Other case:
Please check your OS default cache directory.

from trivy.

030 avatar 030 commented on May 18, 2024

@masahiro331 I think it is useful to add this to the README.md as well

from trivy.

masahiro331 avatar masahiro331 commented on May 18, 2024

@030
Please check here.
https://github.com/knqyf263/trivy#docker

Today added to README.md
knqyf263@2f7f1f8

from trivy.

knqyf263 avatar knqyf263 commented on May 18, 2024

If you have any questions, please reopen this issue. Thanks.

from trivy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.