This is more of a Docker specific question and outside my area of expertise but I'll do my best to point you in the right direction. My first recommendation would be to check out our documentation here:
ASP.NET Core gRPC for WCF devleopers
https://learn.microsoft.com/en-us/dotnet/architecture/grpc-for-wcf-developers/docker
For a solution with a single application, and thus a single Dockerfile, it's simplest to put the Dockerfile in the base directory. In other words, put it in the same directory as the .sln file. In that case, to build the image, use the following docker build command from the directory containing the Dockerfile.
And more specific to your scenario is a similar certificate issue:
https://github.com/dotnet/dotnet-docker/issues/915
If you are using the default dockerfile from visual studio this is the line you have to add:
....
FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803 AS base
USER ContainerAdministrator
WORKDIR /app
EXPOSE 80
EXPOSE 443
I wish I could be of more help, but hopefully that gets you pointed in the right direction.