Closed simonkurtz-MSFT closed 8 months ago
For a little more context, we are using the aforementioned approach with the workaround in our Azure Container Apps with .NET Workshop, which is a freely available workshop for anyone who wants to learn Azure Container Apps.
Thanks for opening!
No, but it's a Microsoft extension for which I am filing the issue.
Which extension? We'll want to move this to whichever extension repo, i.e. https://github.com/microsoft/vscode-remote-release/issues if you're having trouble with the Dev Containers extension, or https://github.com/microsoft/vscode-docker for the Docker extension.
Hi @bamurtaugh, thank you! I think it would be appropriate in the vscode-docker repo. Could I ask you to transfer it, please?
The trouble is that when Linux
is selected, --platform=$BUILDPLATFORM
is included. That may work on someone's local machine, but when it gets sent up to Azure Container Registry for a build, it fails as it is not set there.
Transferred! And assigning Christof and myself (as we work on the Dev Containers extension).
BUILDPLATFORM is set by Docker during build so it might be worth asking ACR to do the same.
@bwateratmsft, makes sense to me. Is that something you all can facilitate with the ACR team by way of an issue? Might be more impactful coming from the PG.
Looks like this is already known by the ACR team; https://github.com/Azure/acr/issues/697 and https://github.com/Azure/acr-builder/issues/449. We'll see if we can draw more attention to it.
@bwateratmsft, thank you! Our workaround at this time is to simply remove --platform=$BUILDPLATFORM
.
We'll close this issue since it doesn't look like there are any changes on our side to make. @fiveisprime is going to follow up with the ACR team to work on prioritizing this.
[like] Simon Kurtz reacted to your message:
From: Brandon Waterloo [MSFT] @.> Sent: Wednesday, November 8, 2023 7:40:09 PM To: microsoft/vscode-docker @.> Cc: Author @.>; Comment @.> Subject: Re: [microsoft/vscode-docker] Docker Extension generates ASP.NET Core Dockerfile with $BUILDPLATFORM Which is not Recognized by Azure Container Registry (Issue #4149)
We'll close this issue since it doesn't look like there are any changes on our side to make. @fiveisprimehttps://github.com/fiveisprime is going to follow up with the ACR team to work on prioritizing this.
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode-docker/issues/4149#issuecomment-1802535350 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUHBQRJN4FZSRSHFFUJZYLDYDPNZVBFKMF2HI4TJMJ2XIZLTSWBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVIYTANRVGE4DKOJZGCSG4YLNMWUWQYLTL5WGCYTFNSBKK5TBNR2WLKRRGE4TQMBVHA2TONNENZQW2ZNJNBQXGX3MMFRGK3FMON2WE2TFMN2F65DZOBS2YSLTON2WKQ3PNVWWK3TUUZ2G64DJMNZZJAVEOR4XAZNKOJSXA33TNF2G64TZUV3GC3DVMWUDINBUGE2TINRZQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRRHE3TKMJYHE2DAMMCUR2HS4DFUVWGCYTFNSSXMYLMOVS2UMJQGY2TCOBVHE4TBAVEOR4XAZNFNRQWEZLMUV3GC3DVMWVDCMJZHAYDKOBVG422O5DSNFTWOZLSUZRXEZLBORSQ. You are receiving this email because you authored the thread.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Does this issue occur when all extensions are disabled?: No, but it's a Microsoft extension for which I am filing the issue.
Steps to Reproduce:
dotnet new webapi -o Foo
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build
Observe the following error:
Given that the ASP.NET Core image is a multi-platform image, the build image makes sense as it tailors to the architecture upon which it is executing the build. What I can't quite make sense of is how to best marry this with a build that is done in Azure Container Registry. This may well not be something that the extension can address, but I am filing it here as a first start since that's where it originates. What should be the appropriate path to generate a Dockerfile with the extension and subsequently run it in ACR?
Mitigations
--platform=$BUILDPLATFORM
from the Dockerfile. This means Azure Container Registry won't need to know about it. I suspect that the internal build that occurs via the Azure Container Registry takes care of this differently to optimize for its platform.