Open inkychris opened 5 years ago
I have this issue as well. My python script prints a proper path such as C:\abc but when this is passed to client.containers.run as part of a command, the back slashes are removed, if I look at the commands through docker ps -a --no-trunc. What is the deal with this? I will likely have to force double back slash all my directories passed to the command.
Passing the
\
character to the daemon in thecontainers.create
method command argument requires escaping twice, once for the string in Python, and then again for something that requires it internally. From a user perspective, given that the command can be given as a string, I'd expect this string to match one that would be provided to the docker CLI:With the following:
char: \
ValueError: No escaped character
'echo char: \\\\'
,r'echo char: \\'
I should also note that I first encountered this passing an msbuild command to a Windows container where providing the
%5C
escape code also seemed to work but not for the alpine container, guessing this was handled by something else.