-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Exec plugin doesn't work in docker container #1758
Comments
@darrug |
@nokute78 I was trying using the version 1.3.2-debug which has the ls installed. This is the output of the command inside the container |
This works for me on master. Could you test it also? Build debug container using master repository?
And afterwards run it: |
@darrug oops, I tested wrong container.. The root cause is missing http://man7.org/linux/man-pages/man3/popen.3.html
in_exec supports only one time command. |
Thank you for the explanation. Long running commands aside, if |
It is easy to add symlink It may be better to replace popen to make fluent-bit more portable, |
any update? |
@nokute78 ping |
We are using It contains only an openssl and it doesn't contain shell and other executable binaries. Is fluent-bit:master-debug container suitable for production? |
the debug version of the container is based on busybox but has a shell, the point of distroless is the security on that aspect. hmm we cannot recommend -debug version for production usage. so it might be a wontfix. |
It seems like we should remove the exec plugin from the container if it's not usable to keep it small and secure - plus make it obvious it won't work before people try to debug it. |
@patrick-stephens I agree. @edsiper Which Dockerfile is to fix ? https://github.com/fluent/fluent-bit/tree/master/dockerfiles |
The one on master is the primary one now (from 1.9 onwards). I can look to do this shortly, I want to also verify whether the debug image supports it now we no longer need busybox. |
The distroless AMD64 image will not work but the ARM images will do as they are not distroless yet - see #4691 . So yes, it was busybox messing things up by the looks of it as we had a proper shell but then did a
The old 1.8.11 debug images do not (they just sit there as the call fails so notice the delay in the timestamps):
I'm not sure we want to add a shell in just to allow this plugin as it invalidates the point of using Distroless. We should document it though on the exec plugin page. |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the |
This issue was closed because it has been stalled for 5 days with no activity. |
Bug Report
Describe the bug
Exec input plugin doesn't work using the docker image. Tested the same command in centos 7 downloading the package and works. I have an executable that send logs to stdout but just for testing purposes I executed the command described in the manual
To Reproduce
output:
Expected behavior
Show stdout of the command in the output like this
Screenshots
Your Environment
fluent-bit -i exec -p 'command=ls /var/log' -o stdout
Additional context
I have to launch an executable and read its stdout
The text was updated successfully, but these errors were encountered: