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

Can't install plugin that need native extension with Alpine based image #22

Closed
EricFortin opened this issue Apr 11, 2016 · 2 comments
Closed

Comments

@EricFortin
Copy link

I am trying to install fluent-plugin-flume in 0.12.21 alpine based image and receive this error:

mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

Digging in the dockerfile, I can see that after installing fluentd the necessary package to build native extension is removed:

apk del build-base ruby-dev

Is this a bug or is the intended use is to re-install those in my docker file and remove them after my plugin is installed like so (note it does require switching to root user momentarily though) ?

USER root
RUN apk --no-cache --update add \
                            build-base \
                            ruby-dev && \
    gem install fluent-plugin-flume && \
    apk del build-base ruby-dev && \
    rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
USER fluent

I guess I can see why you remove those 2 packages as they are quite large but wanted to confirm.

Thanks

@repeatedly
Copy link
Member

Is this a bug or is the intended

This is intended. We want to keep docker image small.

@EricFortin
Copy link
Author

Thanks !

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

No branches or pull requests

2 participants