I have faced the above problem about running selfcontained .net5 app in ubuntu 18 docker. As to me, I think that you can beat it using following commands in container build:
apt-get update && apt-get install libssl1.1 -y