Implement tail for docker logs

Close #6176
\`--tail\`