Service unavailable when using docker agent

Hi Everyone,

So I am to use docker agent on Jenkins. However, I get a “service unavailable error” when I build the job.
The pipeline is

pipeline {
    agent { 
        docker {
        image 'jenkins/agent'
        registryUrl 'https://hub.docker.com'`Preformatted text`
       // registryCredentialsId 'docker_hub_id'
        
    }

and the error message is

$ docker login -u s*** -p ******** [https://hub.docker.com](https://hub.docker.com/) 
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
 **error during connect: Post "https://docker:2376/v1.24/auth": Service Unavailable**

I was able to ping other IP addresses on the host network from the dind container.