girder_worker icon indicating copy to clipboard operation
girder_worker copied to clipboard

File paths from docker transforms should be wrapped in quotes

Open subdavis opened this issue 4 years ago • 1 comments

I don't think it's docker-py's burden to do anything other than ' '.join(container_args)

If our transforms return strings that might have spaces, they also need to be quoted.

Also random note:

https://github.com/girder/girder_worker/blob/35b1830068b7ac56e98785eba9173f2f991e2b3d/girder_worker/docker/transforms/girder.py#L174

I believe this returns a full file path, not a parent directory path.

subdavis avatar Feb 06 '20 22:02 subdavis

HA! I opened #327 like a year ago then forgot about it.

Looks like this is still an issue. Not sure why that issue was closed.

Reproduce with Dockerfile:

FROM debian:buster-slim

COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

entrypoint.sh:

#!/bin/sh -e

ls "$1"

if any part of the path has spaces and you use any of the girder docker transforms as input paths, you get a no such file or directory.

subdavis avatar Feb 06 '20 23:02 subdavis