Add self-signed ssl certificate to gcp containerized .net core web vm instance

I have created a web app using .net core, created a docker image, push it to the gcp registry, and deployed to a vm instance. I’m trying to add a self-signed certificate to the web app so I can use https. I added a certificate in the manner where "dontnet dev-certs https" adds one and when I run the docker container locally I can use https, but when I deploy it and use the external IP for the compute engine, the certificate is not valid.
I’m at a loss if anyone has any ideas.
Thanks.

Source: Docker Questions