.NET 8 Microsoft Docker Image: Failed to create CoreCLR, HRESULT: 0x80070008
Asked Answered
S

4

6

I upgraded my project to .NET 8 today; I followed the official guide on migrating from .NET 7 to .NET 8. However, upon deploying the application, I've encountered a problem.

Locally, the solution builds and runs fine. However, on my Ubuntu server, when I run docker-compose up -d my MVC application container fails. When I look at the logs via docker logs <container id> I simply see:

Failed to create CoreCLR, HRESULT: 0x80070008

I did some Googling and noticed some were saying to add ENV COMPlus_EnableDiagnostics=0 which I did, but that made no difference.

I'm not sure what to do now; everything seems to be OK.

The code is open-source, here is the Dockerfile. And here is what I have in my docker-compose file.

version: "3.7"

services:
  bejebeje-mvc:
    image: bejebeje/mvc:latest
    ports:
      - "5010:5005"
    env_file:
      - ./variables.env
    depends_on:
      - bejebeje-main-db
  bejebeje-main-db:
    image: postgres:12.4
    ports:
      - "8002:5432"
    volumes:
      - data-volume:/var/lib/postgresql/data
    env_file:
      - ./variables.env

networks:
  default:
    external:
      name: bejebeje_net

volumes:
  data-volume:

What am I missing?

Subjection answered 23/12, 2023 at 17:19 Comment(1)
There was a breaking change - New non-root 'app' user in Linux images maybe this behaviour is related to the non-root user. Can you please provide a minimal reproducible example? There is nothing peculiar I see out of the box.Sepoy
S
14

I fixed it by upgrading Docker Engine on my Ubuntu server.

The server was running Docker Engine version 20.xxx, but the latest version was 24.xxx

Subjection answered 25/12, 2023 at 10:49 Comment(1)
It worked for me too.Hoggish
H
2

I fixed it by changing images to alpine images. Also tried option ENV COMPlus_EnableDiagnostics=0 but it didn't help.

Hiram answered 20/3 at 18:5 Comment(0)
P
0

I'm experiencing the same error during upgrade from .NET 6 and .NET 7 projects to .NET 8.

Everything works fine on Windows, but on Linux server I'm still receiving next message:

Failed to create CoreCLR, HRESULT: 0x80070008

The command '/bin/sh -c dotnet restore "Project/Project.csproj" --configfile "./Nuget.config"' returned a non-zero code: 137

ERROR: Job failed: exit code 137

I have Ubuntu 22.04.1.

Tried these approaches:

  1. ENV COMPlus_EnableDiagnostics=0;

  2. inside of docker-compose.yml:

    security_opt:

    • seccomp=unconfined
  3. Upgraded version of Docker from 20.10.X to 25.0.3

And still trying to fix it. I will provide updates.

Puiia answered 26/2 at 18:22 Comment(2)
I'm running into this as well after upgrading to dotnet 8. Were you able to resolve this?Zebe
Try upgrading to the latest Docker Engine. It worked for me.Manon
C
0

add argument --security-opt seccomp=unconfined for docker run command fixed my issue

Contraception answered 2/8 at 5:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.