Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
Docker Engine API - Connection reset by peer

I'm trying to make requests to the Docker API remotely.

I have the docker engine running on virtual machine, and I'm making the requests from docker containers.

Firstly, I've done this to make the Docker daemon listen on a specific IP and port:

edit /lib/systemd/system/docker.service 
ExecStart=/usr/bin/docker -H fd:// -H=tcp://0.0.0.0:5555
systemctl daemon-reload
sudo service docker restart

I configured to listen on 0.0.0.0, so it will be reachable at any IPv4 address.

When I test this via curl on host, it works fine. e.g: curl localhost:5555/services

However, my goal is to make requests from containers. Here is how I construct the docker client inside my go program:

cli, err := client.NewClientWithOpts(
     client.WithHost("tcp://192.168.56.1:5555"),
)
if err != nil {
     panic(err)
}

networkFilters := filters.NewArgs()
networkFilters.Add("driver", "overlay")
networks, err := cli.NetworkList(context.Background(), types.NetworkListOptions{Filters: networkFilters})
if err != nil {
    panic(err)
}

The error I'm having:

http: panic serving 10.255.0.2:39632: error during connect: Get http://192.168.56.1:5555/v1.40/networks?filters=%7B%22driver%22%3A%7B%22overlay%22%3Atrue%7D%7D: read tcp 172.18.0.3:36126->192.168.56.1:5555: read: connection reset by peer

Any ideas? Thanks

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!