Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't deploy docker arm containers with self-contained app targeting linux-arm64 with NET 7 #4203

Closed
vadd98 opened this issue Nov 10, 2022 · 1 comment

Comments

@vadd98
Copy link

vadd98 commented Nov 10, 2022

Describe the Bug

I just upgraded my Docker containers to NET 7 from NET 6 and I'm not able to deploy arm versions of them.
If I build using FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy everything works fine, while if I build using FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy-arm64v8 I get the following error:

> [build 5/8] RUN dotnet restore "MyProject/MyProject.csproj":#13 8.261 /usr/share/dotnet/sdk/7.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(54,5): error MSB4184: The expression "[MSBuild]::GetTargetFrameworkIdentifier(net7.0)" cannot be evaluated. Exception has been thrown by the target of an invocation. [/src/MyProject/MyProject.csproj]

I'd like to underline that if I switch back to sdk:6.0-focal-arm64v8 everything works fine.

For more details, I'm building a self-contained app targeting linux-arm64:

[...]
RUN dotnet build "MyProject.csproj" -c Release -r linux-arm64 -p:PublishReadyToRun=true -p:Optimize=True --self-contained=True -o /app/build

FROM build AS publish

RUN dotnet publish "MyProject.csproj" -c Release -r linux-arm64 -p:PublishReadyToRun=true -p:Optimize=True --self-contained=True -o /app/publish
[...]

Steps to Reproduce

  1. Try do deploy a NET 7 docker container for a self-contained app targeting linux-arm64

Other Information

Output of docker version

Client:
 Cloud integration: v1.0.29
 Version:           20.10.17
 API version:       1.41
 Go version:        go1.17.11
 Git commit:        100c701
 Built:             Mon Jun  6 23:09:02 2022
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Desktop 4.12.0 (85629)
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:23 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.10.2)
  extension: Manages Docker extensions (Docker Inc., v0.2.9)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.19.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 23
 Server Version: 20.10.17
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.15.68.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 20
 Total Memory: 15.46GiB
 Name: docker-desktop
 ID: N7L7:Y344:QWTX:DB3J:O367:JWZD:7KVX:QUZJ:7BCC:GAV4:JV5S:35GD
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5000
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
@mthalman
Copy link
Member

Duplicate of NuGet/Home#12227

@mthalman mthalman marked this as a duplicate of NuGet/Home#12227 Nov 10, 2022
@mthalman mthalman closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants