Prevent double escaping of Dockerfile commands on Windows#17851
Prevent double escaping of Dockerfile commands on Windows#17851runcom merged 1 commit intomoby:masterfrom
Conversation
2c9f026 to
3d365fd
Compare
|
@thaJeztah Any chance of a TP4 tag. This has regressed behaviour from TP3 reported in #17509 |
|
IIUC, this affects the API, so added the impact-label (so we don't forget), may need a docs update as well |
runconfig/config.go
Outdated
There was a problem hiding this comment.
Does this really live in Config? Is it needed to be committed to the final image?
There was a problem hiding this comment.
This seems also so platform specific
There was a problem hiding this comment.
Where is the best place to put it such that it can be sent from dockerfile/dispatchers.go to the execdriver where it needs to be processed? I put it in Config, as that seemed to be the location for similar parameters. And yes, it is platform specific.
There was a problem hiding this comment.
On second thought, I think it does need to live in Config, since it is not a runtime configuration, but rather reflecting the state of the Command.
3d365fd to
f1476a9
Compare
|
Rebased |
|
@runcom - Hey Antonio - which bit of the design are you concerned about? That we're adding something to the persistent state? Unfortunately, I believe we need this persisted there (rather than in hostConfig) as it applies to the command which is stored in there, nothing to do with the host configuration where the container runs. There's no way of breaking the config (or hostconfig) into platform specific parts as these are passed through the API complete. It's only daemon side that the platform daemon can work out what applies and what doesn't. This isn't new though or without precedent - there are certainly linux-specific fields in Config (for example we don't have a TTY; support the recently introduced StopSignal as signals don't exist on Windows; User; or PublishService among probably others). Can you ping me on IRC when you get a chance? I'm concerned if this one gets held up as it breaks some images which need to get built for TP4, plus fixes a TP3 regression, and time is running desperately out now. Thanks! 👍 @darrenstahlmsft I do think though you should postpend the comment in the added field |
|
BTW - @darrenstahlmsft can you add updates to the API docs. I think docs\reference\api\docker_remote_api_v1.22.md is the right place. |
f1476a9 to
bc7ea3f
Compare
|
@jhowardmsft Will do on both accounts (just updated PR before I saw your second comment) |
bc7ea3f to
c9c9a5f
Compare
|
Docs updated, plus moved ArgsEscaped to right after Cmd, as it is directly related. Should I add an example (or change an existing one) of when ArgsEscaped is true? |
|
It wouldn't hurt to add a new one :) |
There was a problem hiding this comment.
I think this will be logged somewhere upper anyway, at least it should
There was a problem hiding this comment.
Ah, it was there already. But it shouldn't, also such logline will tell nothing to reader.
c9c9a5f to
8221a6c
Compare
|
Requested changes made, and docs changes removed (Will resend those in a separate PR) |
8221a6c to
51940d4
Compare
There was a problem hiding this comment.
can be just return "", errors.New(...)
|
LGTM apart from nit |
|
Ping @runcom |
…s on Windows Signed-off-by: Darren Stahl <[email protected]>
51940d4 to
9db5db1
Compare
|
Nit fixed |
|
LGTM |
Prevent double escaping of Dockerfile commands on Windows
|
Agreed with @jhowardmsft to have a follow-up PR to address docs (if any are needed) ping @thaJeztah |
|
@darrenstahlmsft Thanks! But I have to wait until TP4 as of #17919 😢 ;-) But shouldn't take too long I guess. |
This fixes #17509
Signed-off-by: Darren Stahl [email protected]