- Revenera Community
- :
- Code Insight
- :
- Code Insight Forum
- :
- Re: code-insight-docker-images-plugin 2022R4 fails when I use the plugin for remote scan
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
code-insight-docker-images-plugin 2022R4 fails when I use the plugin for remote scan
Trying to perform a remote scan on a docker image.
Plugin: code-insight-docker-images-plugin ->CodeInsight2022R4Plugins.zip.
Current Docker version: Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1
Current Java version: openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment (build 17.0.5+8-Ubuntu-2ubuntu120.04)
OpenJDK 64-Bit Server VM (build 17.0.5+8-Ubuntu-2ubuntu120.04, mixed mode, sharing)
When I run the scan through bash terminal, the scan fails.
Errors:
/bin/java
found java executable in PATH
[2023-04-18 13:47:56] [PLUGIN] [INFO] : DockerImagesScan - scanDocker : Started executing docker scan agent.
[2023-04-18 13:47:56] [PLUGIN] [DEBUG] : CommandLineExecutor - execute : Command to be executed by the ProcessBuilder : docker inspect csrx_tar:latest
[2023-04-18 13:47:57] [PLUGIN] [ERROR] : DockerImagesScan - scanDocker : Failed to scan through scan agent.
Image :csrx_tar:latest not found with latest tag.
[]
Error: No such object: csrx_tar:latest
Please give the image name with valid tag as input.
Exception in thread "main" java.lang.Exception: Failed to scan. Image :csrx_tar:latest not found with latest tag.
[]
Error: No such object: csrx_tar:latest
Please give the image name with valid tag as input.
at com.flexnet.codeinsight.plugin.docker.impl.DockerImagesScan.scanDocker(DockerImagesScan.java:79)
at com.flexnet.codeinsight.plugin.docker.impl.DockerImagesScan.main(DockerImagesScan.java:209)
Could someone help me with these errors. Will updating the Docker version help? Is there a docker version requirement to use the docker plugin?
Hi @siyer02, the error you are running into is usually the result of a "/" in the image name. If the image name in the command contains a forward slash (/), you must provide a valid tag for name, such as “latest”, to avoid issues during the scan. The following example command illustrates the correct <name>:<tag> format to use when the image name contains a forward slash:
./code-insight-docker-plugin.sh -image alpinelinux/darkhttpd:latest
where aplinelinux/darkhttpd is the image name and latest is the added tag (preceded by a colon).
One other important thing to note is that we do not yet officially support OpenJDK 11 or later. We would recommend using Oracle Java 8 if you continue to run into issues.
Hi @tphamda,
Thank you for helping me with the latest tag error. I ran into the following error after
[2023-04-19 16:28:07] [PLUGIN] [ERROR] : DockerImagesScan - scanDocker : Failed to scan through scan agent.
Error executing docker
Error response from daemon: invalid reference format
[2023-04-19 16:28:07] [PLUGIN] [DEBUG] : DockerImagesScan - scanDocker : Deleted /tmp/_b_siyer_remotescan_code-insight-docker-images-plugin_csrx_tar-latest
Exception in thread "main" java.lang.Exception: Failed to scan. Error executing docker
Error response from daemon: invalid reference format
at com.flexnet.codeinsight.plugin.docker.impl.DockerImagesScan.scanDocker(DockerImagesScan.java:79)
at com.flexnet.codeinsight.plugin.docker.impl.DockerImagesScan.main(DockerImagesScan.java:209)
@siyer02, the invalid reference format error is a Docker error that indicates an issue with the syntax you are using for your Docker image. Could you please provide the exact command you are using?
Can you also try running docker build directly to see if there are any issues? e.g. if the repository name is vieux/apache
and the tag is 2.0
, you would run:
docker build -t vieux/apache:2.0 .
@tphamda I was able to resolve the errors and start the remote scan. I have a question though with regards to it. Is proxy connection to the internet a requirement for remote scan through docker plugin?
@siyer02, I'm glad to hear you were able to resolve the errors. If you can provide more details on the resolution, that may be helpful for other community members.
As for your latest question, a proxy is NOT required for any of the remote scan agents.