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

Change attach command for Linux containers from "/bin/sh" to "sh" #159

Closed
wants to merge 1 commit into from
Closed

Change attach command for Linux containers from "/bin/sh" to "sh" #159

wants to merge 1 commit into from

Conversation

FredrikFolkesson
Copy link

@FredrikFolkesson FredrikFolkesson commented Oct 27, 2017

This would solve this problem on windows using git-bash:

oci runtime error: exec failed: container_linux.go:295: starting container process caused "exec: \"C:/Program Files/Git/usr/bin/sh\": stat C:/Program Files/Git/usr/bin/sh: no such file or directory"

Which is because git-bash or MinGW is trying to "translate" the "linux path" /bin/sh to the "windows path" C:/Program Files/Git/usr/bin/sh and not understanding that this path will be used inside the linux docker container and not in your windows environment.

//bin/sh would also work since this disables the MinGW "smartness" about paths.

EDIT:
Here are the MinGW Posix path conversion rules
http://www.mingw.org/wiki/Posix_path_conversion

This would solve this problem on windows using git-bash:

`oci runtime error: exec failed: container_linux.go:295: starting container process caused "exec: \"C:/Program Files/Git/usr/bin/sh\": stat C:/Program Files/Git/usr/bin/sh: no such file or directory"`

Which is because `git-bash` or `MinGW` is trying to "translate" the "linux path" `/bin/sh` to the "windows path" `C:/Program Files/Git/usr/bin/sh` and not understanding that this path will be used inside the linux docker container and not in your windows environment.

`//bin/sh` would also work since this disables the `MinGW` "smartness" about paths.
@FredrikFolkesson
Copy link
Author

Closing this for #160

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

Successfully merging this pull request may close these issues.

1 participant