Dind in docker-compose connection reset by peer

0 votes

In Docker, I'm attempting to connect to a Docker deamon (dind). To run dind and docker-client, I use docker-compose. When I use docker-client to connect to dind, it fails. It returns an error message. What is the best way to deal with this?

version: '3'
services:
  docker:
    # Starts a Docker daemon at the DNS name "docker"
    # Note:
    #  * This must be called "docker" to line up with the default
    #    TLS certificate name
    #  * DOCKER_TLS_CERTDIR defaults to "/certs
    image: docker:dind
    privileged: yes
    volumes:
      - certs:/certs/client
  docker-client:
    # Provides a Docker client container, including the client
    # certs generated by the docker:dind container, above.
    # Notes:
    #  * The name of this container doesn't matter
    #  * The DOCKER_CERT_PATH defaults to /certs/client, the
    #    same path where the docker:dind image generates the
    #    client certificate (and that we've mounted inside this
    #    container).
    # You can execute a shell inside this container by running:
    #   docker-compose exec docker-client sh
    image: docker
    command: sh -c 'while [ 1 ]; do sleep 1000; done'
    environment:
      DOCKER_HOST: tcp://docker:2376
    volumes:
      - certs:/certs/client
volumes:
  certs:
Apr 21 in Docker by pranav
• 580 points
31 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Docker

0 votes
1 answer

Why do I get Connection reset by peer when making a request to a service running in a container?

Typically, this message is returned if the ...READ MORE

answered Jul 10, 2019 in Docker by Sirajul
• 59,170 points
3,327 views
+1 vote
5 answers

Set containers timezones by using docker compose.

version "2" services: serviceA: ...READ MORE

answered Jul 9, 2018 in Docker by Atul
• 10,230 points
16,949 views
0 votes
1 answer
+1 vote
4 answers

Docker compose, running containers in net:host

Hey@Hannah, Check the compose file format specifications ...READ MORE

answered May 7, 2019 in Docker by Kishore
3,920 views
0 votes
1 answer

docker set iptables options in docker-compose.yml

The --iptables option only applies to the ...READ MORE

answered Aug 2, 2018 in Docker by Kalgi
• 52,350 points
1,515 views
0 votes
1 answer
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,060 points
1,562 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP