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

docker run --entrypoint bug under MINGW64 #6754

Closed
2 tasks done
cesarpino opened this issue May 16, 2020 · 3 comments
Closed
2 tasks done

docker run --entrypoint bug under MINGW64 #6754

cesarpino opened this issue May 16, 2020 · 3 comments

Comments

@cesarpino
Copy link

cesarpino commented May 16, 2020

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded diagnostics
  • Diagnostics ID: F22B2AE3-B6C5-46A4-B924-8A677C0B85AD/20200516171208

Expected behavior

Without using --entrypoint, I check bash path.

$ winpty docker container run -ti ubuntu
root@d8e47ed3fa6a:/# which bash
/bin/bash
root@d8e47ed3fa6a:/# exit
exit

If I use explicit entry point I should get a bash session

$ winpty docker container run -ti --entrypoint /bin/bash ubuntu
root@d8e47ed3fa6a:/# 

Actual behavior

Gets confused with --entrypoint parameter which seems to be mixed with a local path.

$ winpty docker container run -ti --entrypoint /bin/bash ubuntu
root@d8e47ed3fa6a:/# 
C:/Program Files/Docker/Docker/resources/bin/docker.exe: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"C:/Program Files/Git/usr/bin/bash.exe\": stat C:/Program Files/Git/usr/bin/bash.exe: no such file or directory": unknown.

Information

  • Windows Version: 10 pro
  • Docker Desktop Version: 2.3.0.2
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: no

Steps to reproduce the behavior

  1. The issue appears in git-bash console (MINGW64). Install it from https://git-scm.com/download/win
  2. Open a git bash console "C:\Program Files\Git\git-bash.exe" --cd-to-home
  3. write in the console winpty docker container run -ti --entrypoint /bin/bash ubuntu
@thaJeztah
Copy link
Member

This is due to Mingw/msys2 doing automatic path conversion; see http://www.mingw.org/wiki/Posix_path_conversion

You can disable this by prefixing paths with // or setting the MSYS_NO_PATHCONV=1 environment variable (see https://stackoverflow.com/a/34386471)

Because this path conversion happens before docker receives the value, its not something we can fix in docker.

Hope this helps!

@mat007
Copy link
Member

mat007 commented May 17, 2020

Closing as this is due to the shell, not docker.

@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 Jul 16, 2020
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

4 participants