Use docker API over TCP without giving root access

0 votes
I wish to use docker API over a TCP network. but I know it's not secure to give the root access to every docker node. How do I goa bout this then?
Jul 31, 2019 in Docker by Himanshu
627 views

1 answer to this question.

0 votes

Docker supports TLS certificates which help in securing your server-node connection. So basically you generate a certificate and a private key and get it signed for a secure connection between the server and the clients.

Generate the key with the following commands:

$ 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 Ashish

Related Questions In Docker

0 votes
1 answer
+4 votes
4 answers

How To Access a Service on Host From a Docker Container?

Adding to kalgi's answer, You can also ...READ MORE

answered Oct 16, 2018 in Docker by lina
• 8,220 points

edited Oct 16, 2018 by lina 34,103 views
0 votes
2 answers

Can't access apache karaf docker container

To access karaf shell directly you can ...READ MORE

answered Aug 6, 2018 in Docker by Nilesh
• 7,060 points
2,517 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,020 points
2,702 views
0 votes
2 answers
+1 vote
2 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP