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

Arguments no longer encoded in ENTRYPOINT when using shell-form with an exec-form SHELL #4386

Closed
heaths opened this issue Aug 1, 2019 · 3 comments

Comments

@heaths
Copy link

heaths commented Aug 1, 2019

In the latest stable version 19.03.1 a user found a problem when building a Dockerfile that uses an exec-form SHELL with a shell-form ENTRYPOINT, which was working up to an including version 18.09.3:

SHELL ["cmd", "/S", "/C"]
# ...
ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat &&

When inspecting the current image, seems ArgsEscaped is missing, which in version 18.09.3 was "ArgsEscaped": true. See https://github.com/MicrosoftDocs/visualstudio-docs/issues/3713 for details.

@mikeparker
Copy link
Contributor

mikeparker commented Aug 2, 2019

Ok i've been looking into this, i am fairly sure this is not a Desktop issue, and rather a docker engine issue, so you probably want github.com/moby/moby

Some history around this, probably related to https://github.com/moby/moby/pull/38541/files
And there was a spec change which changes how arguments get escaped here opencontainers/runtime-spec#998

Out of curiosity, whats the && for at the end of the command line?

@heaths
Copy link
Author

heaths commented Aug 2, 2019

Thanks for finding that. I thought it might be more of an engine issue but typically have been asked to open issues here first. That said, I know @jhowardmsft and will ask him for more context and suggested fixes/workarounds.

We need to start the vsdevcmd.bat environment initialization script (mainly updates the PATH environment variable with installed toolset paths) before we run anything, sot he && means, "if that worked, then run the given command".

@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 8, 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

3 participants