Latest Docker master, targeting Windows:
Dockerfile:
FROM nanoserver
RUN ["cmd /c echo this should fail"]
Expected output:
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM nanoserver
---> b347fce3157a
Step 2 : RUN cmd /c echo this should fail
---> Running in bca3f37416f3
Container command 'cmd /c echo this should fail' not found or does not exist
Actual output:
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM nanoserver
---> b347fce3157a
Step 2 : RUN cmd /c echo this should fail
---> Running in bca3f37416f3
this should fail
---> 9cc6bd333e69
Removing intermediate container bca3f37416f3
Successfully built 9cc6bd333e69
I believe the fix is to set ArgsEscaped to false when parsing a JSON-formatted RUN command.
The same bug probably applies to CMD once #22868 is merged.
cc @jhowardmsft @darrenstahlmsft
Latest Docker master, targeting Windows:
Dockerfile:
Expected output:
Actual output:
I believe the fix is to set
ArgsEscapedtofalsewhen parsing a JSON-formattedRUNcommand.The same bug probably applies to
CMDonce #22868 is merged.cc @jhowardmsft @darrenstahlmsft