ashic
ashic

Reputation: 6495

Using docker and hosts file

I'm trying to get an hbase container running, and the container requires some stuff which means the docker host need to be available as "docker". We achieve this with setting the docker ip in the hosts file with docker. However, when I run:

docker ps

it tells me that the certificate is for localhost and not docker. The following works:

docker --tlsverify=false ps

My questions are: * Is it possible to "update" something so that docker ps works? * Is it possible to turn off tls verification through some environment variable?

I tried setting DOCKER_TLS_VERIFY to 0, and that didn't work. I know turning off tls is insecure, but this is for dev, and other automated scripts expect to run without specifying --tlsverify=false.

Upvotes: 3

Views: 475

Answers (1)

VonC
VonC

Reputation: 1323065

You could consider (for testing) to generate a certificate for docker and localhost (adding the latter in SubjectAltName)

Adding localhost to Subject Alternative Name can have drawbacks, but in your case, it would allow docker ps to run properly anywhere.

Upvotes: 1

Related Questions