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

Add a Dockerfile for fluentd with output plugin installed #16

Merged
merged 10 commits into from Aug 19, 2020

Conversation

yanscalyr
Copy link
Contributor

@yanscalyr yanscalyr commented Jul 23, 2020

Images are expected to be built from the scalyr-fluentd directory Actually 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.
We should decide on a good tag name for this and add that to a Readme or something.

@yanscalyr yanscalyr requested a review from imron July 23, 2020 21:13
# Use root account to use apk
USER root

RUN apk add --no-cache --update --virtual .build-deps \
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

@yanscalyr yanscalyr changed the title Add a Dockerfile for fluentd with out plugin installed Add a Dockerfile for fluentd with output plugin installed Jul 27, 2020
@yanscalyr yanscalyr requested a review from Kami August 3, 2020 17:54
@Kami
Copy link
Contributor

Kami commented Aug 10, 2020

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.

Copy link
Contributor

@dlobue dlobue left a 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

.circleci/config.yml Show resolved Hide resolved
docker/Dockerfile Show resolved Hide resolved
@yanscalyr yanscalyr requested a review from dlobue August 19, 2020 18:07
Copy link
Contributor

@dlobue dlobue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

@yanscalyr yanscalyr merged commit 318c921 into master Aug 19, 2020
@yanscalyr yanscalyr deleted the dockerfile branch August 19, 2020 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants