-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIN/Workaround: don't pass gid and uid to docker run call #140
Conversation
Shall I cancel on of the CI runs? |
Yes, please. It's happening because the push is to this repo rather than a fork. (I don't recall offhand whether there is a knob to prevent Travis from starting up both in this situation.) |
datalad_container/adapters/docker.py
Outdated
"--rm"] | ||
if not on_windows: | ||
prefix_extend(["-u", "{}:{}".format(os.getuid(), os.getgid())]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/_extend/.extend/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argh, thanks for catching that! I hate notepad++. It so easy to lose/miss edits :/
The os module under Windows does not contain getuid() and getgid(), which are called to supply a 'docker run' call with Unix user and group associations. This PR is a temporary workaround in that 'docker run' is called without the -u/--user flag entirely when executed under Windows.
Cancelled. I'll try to remember that and PR from a fork the next time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Fingers crossed that on your end you can at least do this now:
$ datalad containers-add --url dhub://busybox:1.30 bb
$ datalad containers-run -n bb sh -c 'busybox | head -1'
[INFO ] Making sure inputs are available (this may take some time)
[INFO ] == Command start (output follows) =====
BusyBox v1.30.1 (2019-05-09 01:23:43 UTC) multi-call binary.
[INFO ] == Command exit (modification check follows) =====
action summary:
get (notneeded: 1)
save (notneeded: 1)
Success!
|
Travis is running one job at a time, with lots of downtime in between: it's taken over 35 minutes to run two jobs whose total execution time is under 8 minutes and has yet to start the third job. I think those two runs are sufficient for this change... |
A workaround in response to #138. The
--user
flag should now only be used when we're on a non-Windows OS.