skip to Main Content

I am encountering this issue : /docker-entrypoint.sh: line 13: exec: image: not found
when trying to add an image to anchore/engine-cli on docker.

Specifically I run :
docker run anchore/engine-cli image add XXXXX:"image-name"

Could anyone help me on this ? I am running docker desktop on a Windows 10

Thanks !

2

Answers


  1. If you check the documentation of the official anchore/engine-cli image, to use the container you need to run:

    docker run -e ANCHORE_CLI_URL=<my engine endpoint>/v1/ -it anchore/engine-cli
    

    Then, from the shell you can use the anchore-cli command and add a new image with:

    anchore-cli image add <imgage>
    
    Login or Signup to reply.
  2. That image on Docker Hub contains documentation for how to use it:

    To use the container simply run: docker run -e ANCHORE_CLI_URL=<my engine endpoint>/v1/ -it anchore/engine-cli

    From the shell you can now use ‘anchore-cli’: anchore-cli system
    status to get system status anchore-cli image list to list images
    anchore-cli image add <img> to add a new image for analysis
    anchore-cli evaluate check <img> to get the policy evaluation for an
    image.

    So you should be able to run commands like:

    docker run -it --rm anchore/engine-cli anchore-cli image add XXXXX:"image-name"
    

    E.g.

    $ docker run -it --rm anchore/engine-cli anchore-cli image --help
    Usage: anchore-cli image [OPTIONS] COMMAND [ARGS]...
    
    Options:
      -h, --help  Show this message and exit.
    
    Commands:
      add       Add an image
      content   Get contents of image
      del       Delete an image
      get       Get an image
      import    Import an image from anchore scanner export
      list      List all images
      metadata  Get metadata about an image
      vuln      Get image vulnerabilities
      wait      Wait for an image to analyze
    

    However, I’d note that this image was last pushed 2 years ago, and the GitHub repo for the project makes no mention of docker images pushed to GHCR or Docker Hub. All installation options supported by the project involve installing it locally on your machine.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search