'How to solve Failed to connect to the bus error on running puppeteer with docker

We are running puppeteer with docker and whenever it get a new request to run the script we are getting the following error:

Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[0512/093049.750308:WARNING:dns_config_service_posix.cc(342)] Failed to read DnsConfig.

So anyone has any idea why I'm getting this error? what will be the solutions?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source