Closed bhairavmehta95 closed 6 years ago
What is the value of DOCKER_HOST?
Nothing - is it supposed to have a value?
No, it isn't.
It sounds like the communication with the docker host is not working.
Are you on linux, mac? any special configuration? Is the docker daemon running?
Do you have /var/run/docker.sock
as the docker endpoint?
Linux - No special configuration. Docker endpoint seems to be configured okay, since I can run every other docker command and things like portainer.
If we can confirm that its just a issue on my local machine, then we can leave it (I will debug it myself). I just wanted to raise the issue to make sure there were no breaking changes in one of the updates.
Is this the same as the other?
No they are different.
@AndreaCensi did some debugging, but I really don't what the issue is? I don't think its a purely isolated issue because we saw another instance. It seems that
dt-challenges-evaluate-local
works? As you said, I think we should just update the docs to use this method.
The problem is that the native Python code will be brittle because of environment variations.
By the way the lines that launch the image are here: https://github.com/duckietown/duckietown-shell-commands/blob/e2e100e4a652b8fd4a69813205eba88c43422694/challenges/evaluate/command.py#L164-L174
Just a hypothesis, but I think the issue might be with the user argument. Older, working versions of your code didn't have that, and according to here:
https://docker-py.readthedocs.io/en/stable/containers.html
If using the UID, it should be an int, and if using a username, it should be a string. What that line is doing is casting the UID to a string, and that might (somewhere inside of the docker-py
code) treat it like a username, for which the username won't be valid.
@bhairavmehta95 I think one problem was that we didn't pass the "groups" parameter. A user can use the socket if it is in the "docker" group.
Can you try again?
Error Message:
This seems like an issue with my Docker daemon, but I don't think that is the case.
Regular
docker
(i.edocker run...
),docker-compose
(i.edocker-compose up
) work just fine, as well as thedts challenges submit
command.I have updated to the latest
dts
withdts update
.Won't have much time today to look into this, but I will update here if I find the reason.