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

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

+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,200 points

edited Oct 16, 2018 by lina 14,066 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
• 6,970 points
0 votes
1 answer
0 votes
1 answer

Should I use Vagrant or Docker for creating an isolated environment?

If your purpose is the isolation, I ...READ MORE

answered Jul 18, 2018 in Docker by Kalgi
• 2,620 points
0 votes
1 answer
0 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
• 57,550 points
0 votes
2 answers
0 votes
2 answers