Docker delivers an important script named Docker bench security. It is really useful to collect and reporting information, warnings, and pass messages using a simple output. You can clone the bench from its official GitHub repository https://github.com/docker/docker-bench-security:
sudo git clone https://github.com/docker/docker-bench-security
Run the script, and it will check Docker, thanks to predefined best practices. Basically, it is based on the CIS Docker Community Edition Benchmark v1.1.0:
./docker-bench-security.sh