Use chown 1000 xxxoo 

xxxooo file name

 logtest:  
    build:  
      context: logtest/  
    volumes:  
      - ./logtest/logs:./logs:rw  
    networks:  
      - elk  
    command: |  
      /bin/sh -c '/bin/sh -s << EOF  
      echo "Start filebeat...."  
      filebeat run -c ./filebeat.yml -v &  
      sleep 2  
      while [ ! -f ./logs/filebeat ]  
      do  
        sleep 2  
      done  
      chown 1000 ./logs/filebeat  
      tail -f /dev/null  
      EOF'