Use a TLS certificate - Docker

0 votes
I have already created a TLS certificate. Now I would like to tell my docker, how to use it. How do I do that?
Jul 31 in Docker by Riya

1 answer to this question.

0 votes

You do this by creating a drop in systemd unit to modify the existing Docker systemd unit.

Create the file custom.conf in /etc/systemd/system/docker.service.d/:

If you want to restrict local users from using the docker unix socket remove the second -H command line option, if you already have a custom drop in unit you can add the -H and –tls* arguments to it.

Environment="DOCKER_OPTS=-H= -H unix:///var/run/docker.sock --tlsverify --tlscacert=/etc/docker/ssl/ca.pem --tlscert=/etc/docker/ssl/cert.pem --tlskey=/etc/docker/ssl/key.pem"

Reload systemd and the Docker service:

$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
answered Jul 31 by Ajay

Related Questions In Docker

0 votes
1 answer

How to configure my docker container to use a different logging driver?

When you start a docker container, you ...READ MORE

answered Jul 4 in Docker by Sirajul
• 31,180 points
+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,110 points

edited Oct 16, 2018 by lina 4,842 views
0 votes
1 answer
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
• 56,900 points
+1 vote
11 answers