Docker to use Splunk as logging driver

I am using Docker CE and setting up Splunk as the logging driver.
Ref: Splunk logging driver | Docker Docs

I have checked HEC is working all good, which confirms the URL is setup correctly & so as Splunk.

I ran the following:

$ docker run --log-driver=splunk \

–log-opt splunk-token=xxxxxx-yyy-xxxx-aaaa-Vvvvvv
–log-opt splunk-url=https://localhost:8088
–log-opt splunk-insecureskipverify=true
my/application
which gives the following error:
docker: Error response from daemon: failed to initialize logging driver: Options https://localhost:8088/services/collector/event/1.0: dial tcp [::1]:8088: getsockopt: connection refused.
ERRO[0000] error waiting for container: context canceled

Can you please help how can I get this working.

thanks heaps.

Try the below and it should start the container.