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

Fail to execute "Build Image..." command in windows container #3915

Closed
v-ruizh opened this issue Apr 25, 2023 · 4 comments · Fixed by #3931
Closed

Fail to execute "Build Image..." command in windows container #3915

v-ruizh opened this issue Apr 25, 2023 · 4 comments · Fixed by #3931

Comments

@v-ruizh
Copy link

v-ruizh commented Apr 25, 2023

OS: Win 10
Build Version: 20230421.3
Regression: Previous Release

Repro Steps:

  1. Switch Docker Desktop to windows containers.
  2. Open a .NET 8 MVC project in VS Code and add Docker Files to this project with Windows OS.
  3. Right click the Dockerfile in this project and execute "Build Image..." command.
  4. Check whether succeeds to execute "Build Image..." command or not.

Expect:
Succeed to execute "Build Image..." command.

Actual:
Fail to execute "Build Image..." command with an error.
image

More Info:

  1. The docker-build task shows as below, there is an incorrect platform definition in task.json. Remove the platform line, succeed to execute "Build Image..." command.
    image
  2. Succeed to debug this project.
  3. This issue also reproduces on the previous released 1.25.0.
  4. This issue does not reproduce on the previous released 1.24.0.
@alexyaang
Copy link
Member

Looks like it has something to do with the platform flag support here #3874

@alexyaang
Copy link
Member

After discussing with @danegsta, it seems like the best temporary solution is to remove this line so the platform is not hard coded.

However, in the next iteration, we should set the platform flag based on the local architecture of the computer (for release only) and the OS of the container chosen during wizard steps

@bwateratmsft
Copy link
Contributor

We should get this fixed ASAP since it will affect scaffolding.

@alexyaang
Copy link
Member

The fix has now been released in Docker extension version 1.26.0

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.

4 participants