Filebeat.yml: permission denied while runing in docker

I have the Dockerfile for filebeat as below:


COPY filebeat.yml /usr/share/filebeat/filebeat.yml

USER root

RUN chown root:filebeat /usr/share/filebeat/filebeat.yml

USER filebeat

And I build the image like docker build -t filebeat-docker .
run the image like docker run -it --name filebeat-docker-test filebeat-docker

And I got below error:

And my filebeat.yml is as below:


- type: log
  enabled: true
  # Paths that should be crawled and fetched. Glob based paths.
    - /Users/lachen/Documents/n-log/nifi*.log
  tail_files: true

#----------------------------- Kafka output --------------------------------
  # codec.format:
  #   string: '%{[message]}'
  hosts: ["localhost:9092"]
  topic: pam-server-test
    reachable_only: false
  required_acks: 1
  compression: gzip
  max_message_bytes: 1000000

Have you tried passing --strict.perms=false to Filebeat?

Hi, How to pass it to Filebeat?
On run command?
like below:
docker container run --strict.perms=false --name filebeat filebeat:1.0.1

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.