Lego: Problem to access certificates when run with Docker

Created on 18 Apr 2019  路  2Comments  路  Source: go-acme/lego

I launched Lego from Docker. My request was accepted by Lets Encrypt, but I could not access the resulting certificates, as they seem stucked in the container.

I read in the doc that the certificates are stored in a .lego directory in the current working dir. However, as there is no WORKDIR specified within the Dockerfile, the working dir is / by default.

Therefore, it is impossible to fetch the content of the .lego directory with a volume mapping during docker run ...

Am I missing something?

Thanks for your help.

question

All 2 comments

Therefore, it is impossible to fetch the content of the .lego directory with a volume mapping during docker run ...

Use docker run -v /path/to/where/you/want/it:/ssl ... goacme/lego ... --path /ssl run to store your certificates in /path/to/where/you/want/it

Thank you @taoru I did not see this optional argument --path anywhere, must have missed it.

Was this page helpful?
0 / 5 - 0 ratings