code: def check_docker_access(self):
          
          try:
              if self.client is None:
                  self.client = docker.from_env()
              self.client.ping()  # check that docker is running and user is permitted to access it
          except ConnectionError as e:
              logger.exception(e)
              raise BuildError("Docker is not running or the current user doesn't have permissions to access docker.")
docs: Creates a :class:`DockerClient <docker.client.DockerClient>` for the instance and checks the connection.
  
          :raise BuildError: If docker isn't accessible by the current user.