liuweiGL / vite-plugin-mkcert

Provide certificates for vite's https dev service.
https://www.npmjs.com/package/vite-plugin-mkcert
MIT License
544 stars 37 forks source link

Plugin does not work when running from inside docker #22

Closed jonseppanen closed 2 years ago

jonseppanen commented 2 years ago

When running a vite project from inside docker, the certificate is invalid. Attempting to import the certificate into chrome results in "Not an Authority".

liuweiGL commented 2 years ago

Please upload the vite output log.

jonseppanen commented 2 years ago

No errors in vite output log, everything works fine. Problem is the cert is generated and installed on the docker container machine, not the host machine which is browsing to the docker container.

Not sure how you would automate fixing that.

liuweiGL commented 2 years ago

Thanks for your feedback, i will install docker on my computer for testing.

liuweiGL commented 2 years ago

mkcert can not install CA for local machine in docker, maybe you should use "docker mkcert" instead.