-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The specified RuntimeIdentifier 'linux-linux/amd64' is not recognized #31616
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
@JL03-Yue can you take a look here? This looks related to the golang-style platform work we did recently. |
I did see a PR by @JL03-Yue from 26th Feb I believe that may have affected this behaviour but I assumed that it would have been in the nightly build 9 days ago, but I'd love to understand more. |
Yes, will look into this |
@adamlonsdale For the |
Thanks for the response, I tried the -r flag on the latest nightly SDK but it suggests the RID is not found, I presume this is because docker passes linux/amd64 when the RID would be linux-x64. My understanding that the architecture is arm64 so -a would be correct?
|
I think it might be |
I just tested it. It works for me, on both x64 and Arm64 (with $ pwd
/home/rich/git/dotnet-docker/samples/aspnetapp
$ docker build --pull -t aspnetapp --platform amd64 -f Dockerfile.alpine-non-root . Please clone the repo and build from this directory to validate: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp What I see: $ docker build --pull -t aspnetapp --platform amd64 -f Dockerfile.alpine-non-root .
[+] Building 10.3s (15/15) FINISHED
=> [internal] load build definition from Dockerfile.alpine-non-root 0.0s
=> => transferring dockerfile: 54B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/nightly/aspnet:8.0-preview-alpine 0.9s
=> [internal] load metadata for mcr.microsoft.com/dotnet/nightly/sdk:8.0-preview-alpine 0.2s
=> [build 1/6] FROM mcr.microsoft.com/dotnet/nightly/sdk:8.0-preview-alpine@sha256:75a196c1a3484d1d937eb07efb8c0 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 6.79kB 0.0s
=> [stage-1 1/3] FROM mcr.microsoft.com/dotnet/nightly/aspnet:8.0-preview-alpine@sha256:33db03d4f1828a99a0711ecb 0.1s
=> => resolve mcr.microsoft.com/dotnet/nightly/aspnet:8.0-preview-alpine@sha256:33db03d4f1828a99a0711ecb3c403c81 0.0s
=> => sha256:33db03d4f1828a99a0711ecb3c403c81390d85ef34987e35ce8289ef2f44633d 1.11kB / 1.11kB 0.0s
=> => sha256:382c700816424f91113d9043c82ee1c6aeeb67dae9370d3279b6fa38b5c70997 1.37kB / 1.37kB 0.0s
=> => sha256:37c042de115a31844c5eeeca9f31619db70727f7cefb8854afd5fe3fc9eaff4c 4.90kB / 4.90kB 0.0s
=> CACHED [build 2/6] WORKDIR /source 0.0s
=> CACHED [build 3/6] COPY aspnetapp/*.csproj . 0.0s
=> [build 4/6] RUN dotnet restore -a amd64 3.8s
=> [stage-1 2/3] WORKDIR /app 0.0s
=> [build 5/6] COPY aspnetapp/. . 0.1s
=> [build 6/6] RUN dotnet publish -a amd64 --no-restore -o /app 5.1s
=> [stage-1 3/3] COPY --from=build /app . 0.1s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:a696bf37b41ca95dcfdf2f4ec85430b25cedf2e8ddf51470b85b1bc51bb1c46c 0.0s
=> => naming to docker.io/library/aspnetapp 0.0s
$ docker inspect aspnetapp -f "{{.Os}}\{{.Architecture}}"
linux\amd64 |
hello, I can confirm that on Preview 3 when changing TARGETARCH it does indeed resolve the issue and build the container. Thanks! |
Describe the bug
When building an amd64 container on an arm64 device (MacBook Pro M2) I hit the problem with dotnet restore hanging forever. I mitigated this by using the BUILDPLATFORM env variable in tandem with the 8.0 nightly preview SDK.
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/nightly/sdk:8.0-preview as build-env
This worked well 9 days ago but seemingly running the same command now seems to suggest it's trying to restore a linux-linux/arm64 RID which won't exist.
To Reproduce
docker buildx build --platform linux/arm64,linux/amd64 --output "type=image,push=true" --no-cache --file ./Dockerfile . --compress --tag "REDACTED"
I have the relevant portion of my Dockerfile below
which outputs
Exceptions (if any)
The specified RuntimeIdentifier 'linux-linux/amd64' is not recognized
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: