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

Enable specifying a platform for build #3870

Closed
richlander opened this issue Mar 17, 2023 · 9 comments · Fixed by #3874
Closed

Enable specifying a platform for build #3870

richlander opened this issue Mar 17, 2023 · 9 comments · Fixed by #3874

Comments

@richlander
Copy link
Member

richlander commented Mar 17, 2023

We should enable people to build x64 images on Arm64 machines. The cloud is still mostly x64.

Updating tags to switch between x64 and Arm64 isn't great. It's inconvenient and alters assets under source control. Also, .NET has architectural-specific aspects (RIDs), however, we've been able to make that work well with --platform.

Here is where we are headed with .NET: dotnet/dotnet-docker#4388

@bwateratmsft
Copy link
Contributor

bwateratmsft commented Mar 17, 2023

We talked about this some in standup yesterday. Command customization already facilitates this for non-task scenarios, and adding support for a flag to control --platform to the docker-build task is pretty straightforward.

@richlander
Copy link
Member Author

Can you folks write a tutorial for this?

@spboyer
Copy link
Member

spboyer commented Mar 17, 2023

@bwateratmsft tried adding
"platform" : "linux/arm64" to dockerBuild section and it is not picked up in the command when run, where is the proper place to insert?

@bwateratmsft
Copy link
Contributor

@spboyer It's not supported by the extension code yet, what I meant was it wouldn't be difficult to add support.

@spboyer
Copy link
Member

spboyer commented Mar 17, 2023

I suggest adding the "platform" option in the "docker-build: debug" and "docker-build: publish" tasks when scaffolding occurs with the local architecture defaulted there.

We can add a tutorial for creating additional and/or editing.

@bwateratmsft
Copy link
Contributor

I think we should only add it for the release build task. Adding it to the debug build task would result in a debug config that may not work across different platforms. (i.e., same repo, different machines).

@spboyer
Copy link
Member

spboyer commented Mar 17, 2023

Good point.

@richlander
Copy link
Member Author

I think you mean publish but that makes sense.

@stormwind85
Copy link

Hello !
Can't wait about the next release.

What about this issue ?
Could you validate the associated MR ? ~> #3874

@bwateratmsft bwateratmsft removed their assignment Apr 10, 2023
@microsoft microsoft locked and limited conversation to collaborators May 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants