get log from a docker machine

C++
docker logs <container_id> --tail N
Source

Also in C++: