Question

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

Posted November 26, 2019 631 views
SecurityDocker

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

  web:
    ...
    environment:
      ASPNETCORE_URLS: ${ASPNETCORE_URLS}
      ASPNETCORE_Kestrel__Certificates__Default__Password: ${ASPNETCORE_KESTREL_CERTIFICATE_PASSWORD}
      ASPNETCORE_Kestrel__Certificates__Default__Path: ${ASPNETCORE_KESTREL_CERTIFICATE_PATH}
    ports:
      - "443:443"
    volumes:
      - ${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.

0 answers
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!