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

Containers with --platform=linux always return with exit code -1 on Windows Containers #10813

Closed
1 of 3 tasks
bdegreve opened this issue Apr 2, 2021 · 4 comments
Closed
1 of 3 tasks

Comments

@bdegreve
Copy link

bdegreve commented Apr 2, 2021

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
    (no because I need the experimental feature to use --platform linux)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Actual behavior

docker run --platform linux ... always exits with exit code -1, even if the process it ran inside the container exited successfully.

Expected behavior

If the process in the container exits successfully, I expect docker run to exit successfully as well.

Information

  • Windows Version: 10 2004 build 19041.868
  • Docker Desktop Version: 3.2.2
  • WSL2 or Hyper-V backend? Hyper-V I guess, it's Windows Containers on Windows Pro.
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No

Steps to reproduce the behavior

  1. Switch to Windows Containers
  2. Open a powershell prompt
  3. Run docker run --rm hello-world
  4. Run echo $LastExitCode. This will print 0.
  5. Run docker run --rm --platform linux hello-world
  6. Run echo $LastExitCode. This will print -1.
  7. Switch to Linux Containers
  8. Run docker run --rm --platform linux hello-world
  9. Run echo $LastExitCode. This will print 0 again.
@stephen-turner
Copy link
Contributor

Thank you for the ticket. Unfortunately Linux Containers on Windows are now deprecated, and no further work will be done on them. See https://docs.docker.com/engine/deprecated/#linux-containers-on-windows-lcow-experimental.

@bdegreve
Copy link
Author

bdegreve commented Apr 6, 2021

@stephen-turner Thanks for letting me know, but this feature allowed me to run both Windows and Linux containers without having to swap between modes. I.e. my Docker Desktop daemon was always in Windows containers mode, but this --platfrom linux swich allowed me to run Linux containers regardless. Will this still be possible somehow?

@stephen-turner
Copy link
Contributor

We don't have a solution for that right now, but we are aware of the use case and we do have a roadmap item at docker/roadmap#79 that you can vote for.

Unfortunately LCOW (which was contributed by external developers, not our own employees) never reached a level of quality we were happy with, which is why it never graduated from experimental, and we haven't built another solution yet.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants