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.

def check_docker_access(self):
        """ 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.
        """
        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.")