How can I download docker logs from remote server easily ? I can pipe the logs to a file and then use scp to download the file, but it's a bit cumbersome.
Depends what you're trying to do.
If you're just trying to ship the logs off somewhere else for storage/auditing purpose, maybe consider a different logging driver like the syslog or splunk drivers.
However, if you just want to copy them locally for debugging purposes, the json-file driver will store the files in /var/lib/docker/containers/<container-id>/<container-id>-json.log
You can simply scp that file down and get all the logs you need.
Their are multiple ways of doing it.
Docker logs are nomally present at
/var/lib/docker/containers/<container-id>/<container-id>-json.log
Do direct scp from the remote system.
Use some log monitoring tools like Graylog or ELK so that you can stream your live container logs in browser.
Use Container orchestration tool like kubernetes which shows all container logs in its console itself even if multiple remote nodes are present.