This is related only to a docker setup without redirecting logs to the file. In this case you do not need to search for a container-id and other useless things, just use docker logs instead.
But if you did redirect to the file, then you need to setup a logrotate