Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normal docker build gets logged as ERROR because of docker scan message #1575

Closed
scottkurz opened this issue Aug 19, 2022 · 0 comments · Fixed by OpenLiberty/ci.common#384
Closed

Comments

@scottkurz
Copy link
Member

With a real basic liberty:devc build, the output looks like something bad happened (uses ERROR logging) for perfectly normal output.

[INFO] ---> 66605172afcc
[INFO] Successfully built 66605172afcc
[INFO] Successfully tagged intro-dev-mode:latest
[INFO] SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories ad
ded to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files
and directories.
[ERROR]
[ERROR] Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[INFO] Completed building Docker image.

This is because docker build writes the docker scan suggestion to stderr.

It looks like
https://forums.docker.com/t/silence-the-snyk-message-after-docker-build/107982/3
we can do:
DOCKER_SCAN_SUGGEST=false docker build ..
to disable this behavior.

I think we should. I realize this fix would probably be in ci.common but it might be more discoverable here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants