Ansible molecule and docker

Hi, I’m creating roles and because of some limitations running the tests under docker I was thinking of checking if it’s running on docker and adapt.

How can I do this?

Thanks,
Bruno