N
N
NOONE2017-07-06 17:31:58
Docker
NOONE, 2017-07-06 17:31:58

Docker - how to forward ssl to container?

Good afternoon colleagues. tell me please, I need to run Grafan with https inside the container.
Actually I configured everything through docker-compose.yml

services:
    grafana:
      image: grafana/grafana
      restart: always
      depends_on:
        - mysql
      volumes:
        - "/home/docker/monitoring/grafana/grafana.ini:/etc/grafana/grafana.ini"
        - "/home/docker/monitroing/grafana/lib:/var/lib/grafana/"
        - "/home/docker/monitoring/grafana/logs:/var/lib/log/grafana/"
        - "/grafana-other:/etc/ssl/certs/"

Everything works, but it doesn’t find the certificates, I mounted a separate grafana-other directory for them, threw the key there and the key.pem cert and cert.pem in grafana.ini registered
cert_file =/etc/ssl/cert.pem
cert_key =/etc/ssl/key.pem

As a result, it swears at startup that it cannot find these 2 files, what's the problem? where did I screw up?
Thank you
'
logger=server error="Cannot find SSL cert_file at /etc/ssl/cert.pem"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nazar Mokrinsky, 2017-07-06
@Djam36

So you have certificates in /etc/ssl/certs/, and you look for them in /etc/ssl/. Correct the paths in grafana.ini.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question