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
Add a Dockerfile for fluentd with output plugin installed #16
Conversation
# Use root account to use apk | ||
USER root | ||
|
||
RUN apk add --no-cache --update --virtual .build-deps \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it might be worth doing a multi-stage build, and then just copying the final gem into the fluentd container when done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just went with what the fluend documentation recommended for adding plugins to docker. Copying the gem wouldn't be enough right, the installation actually does stuff besides moving the gem I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right this install just pulls it from RubyGems anyway, my bad, gotcha.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, when I try to install from the file generated by rake build
it starts Building native extensions. This could take a while...
then errors out:
`/usr/lib/ruby/gems/2.5.0/gems/fluent-plugin-scalyr-0.8.9/bin/pidof` does not exist, maybe `gem pristine fluent-plugin-scalyr` will fix it?
`/usr/lib/ruby/gems/2.5.0/gems/fluent-plugin-scalyr-0.8.9/bin/sh` does not exist, maybe `gem pristine fluent-plugin-scalyr` will fix it?
`/usr/lib/ruby/gems/2.5.0/gems/fluent-plugin-scalyr-0.8.9/bin/nisdomainname` does not exist, maybe `gem pristine fluent-plugin-scalyr` will fix it?
ERROR: Error installing /tmp/fluent-plugin-scalyr.gem:
"readlink" from fluent-plugin-scalyr conflicts with /usr/bin/readlink
LGTM, but let's make sure we also build this image as part of our CI/CD - just to make sure it's up to date and working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Some questions though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
Images are expected to be built from theActually it doesn't matter at all I think. Images produced this way are compatible with AWS Firelens so we can ingest logs from Fargate with the proper setup.scalyr-fluentd
directoryWe should decide on a good tag name for this and add that to a Readme or something.