fluent-plugin-opensearch install 에러

ignos·2022년 11월 4일
FROM fluent/fluentd:v1.15-1

USER root

RUN apk add --no-cache --update --virtual .build-deps \
        sudo build-base ruby-dev \
 && sudo gem install fluent-plugin-opensearch  \
 && sudo gem install fluent-plugin-multi-format-parser  \
 && sudo gem sources --clear-all \
 && apk del .build-deps \
 && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem

COPY ./conf/fluent.conf /fluentd/etc/
COPY entrypoint.sh /bin/
RUN chmod +x /bin/entrypoint.sh

USER fluent

Opensearch 이용하려고 FluentD 도커 이미지 만드는데 아래와 같은 에러 발생.

`set_default_engine': Unable to find a compatible xml library. Ensure that you have installed or added to your Gemfile one of ox, oga, libxml, nokogiri or rexml (RuntimeError)

에러문만 차분하게 읽었어도 가볍게 해결할 수 있는 문제였는데 fluent-plugin-elasticsearch 인스톨할 때는 문제 없었던지라 fluent-plugin-opensearch 설정 등의 문제로만 접근하다 공연히 헤맸다.

에러문에서 권고한대로 Dockerfile 에 rexml 설치하도록 추가하니 잘 만들어진다.

sudo gem install rexml

profile
ignoramus

0개의 댓글