Here’s a quick one-liner to tail -f home assistant logs from a docker image. I’m sure there are better ways to do this but I got tired of typing a bunch of commands so finally figured out this one liner to save:
docker ps -a | grep homeassistant | cut -d ' ' -f1 | xargs docker logs -f
Assumes your homeassistant docker image is called ‘homeassistant’
then add this to .bashrc
alias log_ha='docker ps -a | grep homeas | awk "{print \$1}" | xargs docker logs -f'