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

0 votes

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 in Docker by Shravan
70 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 by Kavya

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,880 points
76 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,510 points

edited Oct 15, 2018 by Kalgi 266 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,530 points
409 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 in Docker by Sirajul
• 25,700 points
1,481 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,880 points
267 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
• 40,460 points
2,148 views