Jenkins docker slave configuration Error: SSH service hadn’t started after 43 seconds

I’m trying to configure Jenkins docker slave and execute the Jenkin’s job, But I’m getting SSH service hadn't started after 43 seconds error when I executed the job and the job is stuck in the pending state.

enter image description here

On the docker host, the image has been pulled and the docker container started but after a few seconds, it is disappearing.

$ docker ps
CONTAINER ID        IMAGE                                            COMMAND                  CREATED             STATUS              PORTS                   NAMES
4d5ce59aaf97        someone/jenkins-docker-slave:1.0   "/usr/sbin/sshd -D -…"   41 seconds ago      Up 39 seconds>22/tcp   lucid_hypatia

Can someone help me how to resolve this error

Source: Docker Questions