how to get logs from a docker container to a file code example Example: docker container logs docker container logs --details container-id