fluentd-docker-image icon indicating copy to clipboard operation
fluentd-docker-image copied to clipboard

symlink_path is absolute, so link is broken when accessed from host

Open edrex opened this issue 9 years ago • 2 comments

When following the instructions in the readme, the symlink created by fluentd via symlink_path /fluentd/log/docker.log is broken when read from the host. If the symlink were relative it would work. It looks like this would require a change upstream, but reporting here since it's a problem primarily when using the docker image.

edrex avatar Aug 30 '16 19:08 edrex

There is workaround for this issue:

  1. You mount fluent home directory:

    docker run -d -p 24224:24224 -v /data:/home/fluent fluent/fluentd
    
  2. Define relative path for path and symlink_path:

    path ${tag}.*.log
    symlink_path "${tag}.log"
    

kkujawinski avatar Oct 12 '16 08:10 kkujawinski

Home Directory doesn't work. The trick is that you have to set the "working directory" during the container startup with "-w". Then your files will be created in that directory. You can mount this directory as well.

nico1106 avatar Jun 04 '19 08:06 nico1106