Conversation
bca1b6f to
e2c0405
Compare
There was a problem hiding this comment.
Since normaliseWorkdirUnix replaces Windows path separators with Unix, how about tests for that?
There was a problem hiding this comment.
Added case {"linux", \a, b\c, /a/b/c, ``},
e2c0405 to
d8b6a7f
Compare
|
Updated for PS E:\docker\build\lcow> docker run --rm --workdir /bin busybox ls -l sh
-rwxr-xr-x 385 root root 1049592 Aug 4 19:56 sh |
d8b6a7f to
2c69572
Compare
daemon/container.go
Outdated
There was a problem hiding this comment.
Is this a sufficient LCOW check? I think so, at least for now, but maybe system.LCOWSupported is preferred.
There was a problem hiding this comment.
I could be more explicit, but in reality, here it's redundant. It can only be LCOW.
|
As discussed in #33854 there is no such thing as "build platform". Only platform for current stage (and maybe default platform for image access if maintainers can agree on it). So these should be used instead for detecting if conversion is needed. Ideally I would even like if this conversion only happens on starting a container instead of the builder but we can discuss that in another issue. OCI image spec doesn't seem to define anything about |
To be more accurate, your goal is that there shouldn't be such a thing as a "build platform". I don't necessarily disagree (entirely), but the fact is it's there presently, and the resolution of how the code base gets updated, if indeed to use
Yes, but after #33854 has been ratified and agreed.
Sure, that's for later and also orthogonal. But I have concerns about cache breaks if you are going to consider that. The builder has done normalization in this way since WS2016 TP4 days - a very long time. This PR doesn't change that, it just makes sure that the Windows daemon doesn't universally assume it's a full Windows path.
Again, if it doesn't, that is also orthogonal to this PR and something which needs addressing in the OCI docs rather than here. |
There was a problem hiding this comment.
nit: normalize (do we standardize on us eng?)
|
As discussed offline, both build and create paths will need to be updated based on the #33854 outcome and the current definitely isn't correct. LGTM to unblock |
Signed-off-by: John Howard <jhoward@microsoft.com>
2c69572 to
9fa4490
Compare
|
@johnstep Are we going to have a PR correcting the spelling errors before merging? |
|
@stevvooe I also prefer we standardize on language and locale. Is there official guidance for this somewhere? Can it be overridden on a file-by-file basis? @jhowardmsft, what is your take? |
|
I took care of it in #34602. |
Signed-off-by: John Howard jhoward@microsoft.com
WORKDIR in LCOW mode was being treated as a Windows path and not working -
/binwas being translated toC:\bin. This fixes it to use Unix semantics.@johnstep @dnephin PTAL
@gupta-ak - I left a
TODOin there for the remote filesystem operation.