"Failed to create CoreCLR" error in a .NET 6 docker container

Today when I was trying to spin up a dockerized .NET 6 application on an Ubuntu 20.04 host, I was greeted with the following error:

1
Failed to create CoreCLR, HRESULT: 0x80070008

Fortunately I had another host which could run the application, so I did a quick comparison of the two hosts. Luckily for me, the first thing I looked into was the docker version, and that turned out to be the problem.

More specifically, the version of docker-ce (the docker engine) was the problem. Following are the versions of the two hosts:

  1. On the running host: 28.0.4
  2. On the failing host: 20.10.4

Updating the docker engine to 28.0.4 fixed the problem.

Built with Hugo
Theme Stack designed by Jimmy