Docker build DOTNET 8 inside container called by Jenkins - ERROR Failed to create CoreCLR, HRESULT: 0x80070008
- Dominant language
- Dockerfile
- Stars
- 4.9k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 26
Description
### Describe the Bug
We want to build our application in DOTNET 8 inside a docker container on a Jenkins. During calling the dotnet command we get the following error message:
```
09:53:49 #13 [restore 9/12] RUN dotnet --info
09:53:50 #13 0.226 Failed to create CoreCLR, HRESULT: 0x80070008
09:53:50 #13 0.226
09:53:50 #13 0.226 Host:
09:53:50 #13 0.226 Version: 8.0.0
09:53:50 #13 0.226 Architecture: x64
09:53:50 #13 0.226 Commit: 5535e31a71
09:53:50 #13 0.226 RID: linux-x64
09:53:50 #13 0.226
09:53:50 #13 0.226 .NET SDKs installed:
09:53:50 #13 0.226 8.0.100 [/usr/share/dotnet/sdk]
09:53:50 #13 0.226
09:53:50 #13 0.226 .NET runtimes installed:
09:53:50 #13 0.226 Microsoft.AspNetCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
09:53:50 #13 0.226 Microsoft.NETCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
```
We saw the error is already thrown by calling dotnet --info.
That is the reason we created the following dockerfile for our test:
```
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS restore
RUN ldd --version
RUN dotnet --info
```
During the docker build we saw the following IDD version information:
ldd (Debian GLIBC 2.36-9+deb12u3) 2.36
### Our environment
* **Jenkins** runs on **centos 7** inside a container.
* During starting a pipeline we start a container **slave** where the pipeline code is running.
* Inside the pipeline we start the **docker build command**.
### Other Information
Versions we saw:
* Operations system: CentOS Linux release 7.9.2009 (Core)
* Ldd version inside dotnet build container: ldd (Debian GLIBC 2.36-9+deb12u3) 2.36
We saw that Centos 7 is not more supported by DOTNET 8 because because the required glibc version has increased to 2.23 (CentOS 7 uses 2.16). But our understanding was, that when we build our application inside the mcr.microsoft.com/dotnet/sdk:8.0 container and not from the operation system level it would be possible to create the application.
### Questions
* Do you know if our scenario is not more supported or if our understanding was correct and it is possible?
* If our scenario should work, what is the best way to find out why the dotnet command is not possible to call?
### Output of `docker version`
Docker version 24.0.7, build afdd53b
### Output of `docker info`
```
10:33:22 Client: Docker Engine - Community
10:33:22 Version: 24.0.7
10:33:22 Context: default
10:33:22 Debug Mode: false
10:33:22 Plugins:
10:33:22 buildx: Docker Buildx (Docker Inc.)
10:33:22 Version: v0.11.2
10:33:22 Path: /usr/libexec/docker/cli-plugins/docker-buildx
10:33:22 compose: Docker Compose (Docker Inc.)
10:33:22 Version: v2.21.0
10:33:22 Path: /usr/libexec/docker/cli-plugins/docker-compose
10:33:22
10:33:22 Server:
10:33:22 Containers: 0
10:33:22 Running: 0
10:33:22 Paused: 0
10:33:22 Stopped: 0
10:33:22 Images: 0
10:33:22 Server Version: 19.03.15
10:33:22 Storage Driver: overlay2
10:33:22 Backing Filesystem: extfs
10:33:22 Supports d_type: true
10:33:22 Native Overlay Diff: true
10:33:22 Logging Driver: json-file
10:33:22 Cgroup Driver: cgroupfs
10:33:22 Plugins:
10:33:22 Volume: local
10:33:22 Network: bridge host ipvlan macvlan null overlay
10:33:22 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
10:33:22 Swarm: inactive
10:33:22 Runtimes: runc
10:33:22 Default Runtime: runc
10:33:22 Init Binary: docker-init
10:33:22 containerd version: ea765aba0d05254012b0b9e595e995c09186427f
10:33:22 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
10:33:22 init version: fec3683
10:33:22 Security Options:
10:33:22 apparmor
10:33:22 seccomp
10:33:22 Profile: default
10:33:22 Kernel Version: 5.15.107+
10:33:22 Operating System: Alpine Linux v3.13 (containerized)
10:33:22 OSType: linux
10:33:22 Architecture: x86_64
10:33:22 CPUs: 4
10:33:22 Total Memory: 31.36GiB
10:33:22 Name: jdk8-rqg8n
10:33:22 ID: ...
10:33:22 Docker Root Dir: /var/lib/docker
10:33:22 Debug Mode: false
10:33:22 Experimental: false
10:33:22 Insecure Registries:
10:33:22 127.0.0.0/8
10:33:22 Live Restore Enabled: false
10:33:22 Product License: Community Engine
```
Contributor guide
Assessment
This issue has not been assessed yet.