Problem scenario
When in virtualenv you try to run a Molecule command. But you get this message:
ERROR: Unable to contact the Docker daemon. Please refer to https://docs.docker.com/config/daemon/ for managing the daemon
What should you do?
Solution
1. Exit virtualenv. Run this command: deactivate
2. Go back into virtualenv (e.g., run a command like this source my_env/bin/activate
).
3. The problem should be gone by now. If you get the problem again, reboot the server.