def connect(self):
        """Connect to the Docker server."""
        try:
            ret = docker.from_env()
        except Exception as e:
            logger.error("docker plugin - Can not connect to Docker ({})".format(e))
            ret = None

        return ret
def connect ( self ) : try : ret = docker . from_env ( ) except Exception as e : logger . error ( "docker plugin - Can not connect to Docker ({})" . format ( e ) ) ret = None return ret
Connect to the Docker server.