How to use the certificate generated by DigitalOcean in a docker container?

Posted November 26, 2019 2.1k views

I have a web site running in a docker container and I can use a self-signed certificate in it:

      ASPNETCORE_Kestrel__Certificates__Default__Password: ${ASPNETCORE_KESTREL_CERTIFICATE_PASSWORD}
      ASPNETCORE_Kestrel__Certificates__Default__Path: ${ASPNETCORE_KESTREL_CERTIFICATE_PATH}
      - "443:443"
      - ${CERTIFICATE_PATH}:/root/.dotnet/https

This works fine (with the self signed certificate alert in the browsers).

Now I’m trying to use DigitalOcean’s certificates in that web site.

I’ve redirected my hostname to DigitalOcean’s hostnames and generated a certificate at “account/security”. Ping and whois give the expected results.

Now I would like to tell the docker container to use that certificate I’ve just created instead of the self-signed certificate but I can’t find where does DigitalOcean store the certificates it creates&manages.

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!