Docker error "DON'T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!] "

+1 vote

I am trying to run docker on an ec2 instance but I end up with the following error:

[ec2-user@ip-172-31-45-55 .docker]$ ls

ca-key.pem  ca.pem  ca.srl  key.csr  openssl.cnf  secret.yaml

[ec2-user@ip-172-31-45-55 .docker]$ pwd

/home/ec2-user/.docker

[ec2-user@ip-172-31-45-55 .docker]$ sudo dockerd -D --tls --tlscert ~/.docker/ca.pem --tlskey ~/.docker/ca-key.pem -H tcp://172.17.8.101:2376

WARN[2019-07-24T21:02:05.584942967Z] [!] DON'T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!] 

Failed to load listeners: listen tcp 172.17.8.101:2376: bind: cannot assign requested address

Jul 31, 2019 in Docker by Shravan
292 views

1 answer to this question.

0 votes

Did you generate/create a certificate?? If not then you will have to first create a self-signed certificate and then add it to docker. Also, you can use any IP(it can be the host IP just change the last digit). Please find the below link for the steps to generate a certificate and setup tls security for docker. 

$ sudo mkdir -p /etc/docker/ssl
$ mkdir -p ~/.docker
$ openssl genrsa -out ~/.docker/serverkey.pem 2048
$ openssl req -new -x509 -days 365 \
  -key serverkey.pem \
  -sha256 \
  -out server.crt
answered Jul 31, 2019 by Kavya
with full quallified folders:

openssl req -new -x509 -days 365 -key ~/.docker/serverkey.pem -sha256 -out /etc/docker/ssl/server.crt
Hey @DaRolla! I hope you are doing good. Thank you for your contribution.

You could register at Edureka community and get credits for contributing. The contribution could be anything, asking a question, answering, commenting or even upvoting.

Thanks!

Related Questions In Docker

0 votes
1 answer

Access IP address of Couchbase container on Docker Swarm cluster

The property .NetworkSettings.Ports is a map, not a struct. ...READ MORE

answered Aug 24, 2018 in Docker by Nilesh
• 6,920 points
137 views
0 votes
1 answer

Docker ports are working on the localhost but not with public ip

Probably, the reason is that you've included ...READ MORE

answered Jun 12, 2018 in Docker by Damon Salvatore
• 5,520 points

edited Oct 15, 2018 by Kalgi 366 views
0 votes
1 answer

How to obtain the Docker container's IP address from the host?

This can be done by executing the ...READ MORE

answered Jul 16, 2018 in Docker by Sophie may
• 9,920 points
2,163 views
0 votes
2 answers

How do I fix the “no space left on device” error in docker?

Try cleaning up: $ docker volume rm $(docker ...READ MORE

answered Aug 14, 2019 in Docker by Sirajul
• 46,080 points
2,733 views
0 votes
1 answer
0 votes
1 answer

Init could not choose ip address error while doing docker swarm init

First look for the public IP of ...READ MORE

answered Aug 23, 2018 in Docker by Nilesh
• 6,920 points
437 views
+1 vote
1 answer

How to expose docker container's ip and port to outside docker host without port mapping?

you can accomplish this with IP aliasing ...READ MORE

answered Aug 2, 2018 in Docker by Kalgi
• 51,110 points

edited Jan 16 by Kalgi 4,575 views