intel / thunderbolt-software-user-space

Other
104 stars 24 forks source link

Testing: Add makefile targets and testing documentation #43

Closed finikorg closed 6 years ago

ybernat commented 6 years ago

I couldn't make it run on my machine. Seems like apt-get doesn't get the proxy settings. Any idea how to make it easily (preferably w/o adding a lot of commands or additional file just to build an apt.conf inside the container)?

superm1 commented 6 years ago

You have to pass extra options into docker containers with the environment variables you want to set. It can be done with an extra argument to the docker command.

If your proxy runs on a local IP such as loopback address you'll also need to adjust iptables forwarding because docker runs a different interface by default (eg 172.17.0.1 IIRC)

finikorg commented 6 years ago

I have not tried it yet but I think it is possible to set proxy for docker in systemd service: https://docs.docker.com/engine/admin/systemd/#httphttps-proxy

ybernat commented 6 years ago

@finikorg Of course I did it already, otherwise the image fetching wouldn't work. But this is for the daemon itself, not for the containers.

@superm1 Yep, I tried even adding explicit ENV to Dockerfile but seems like apt doesn't use it (probably because sudo drops by default all the environement vars). This is why I mentioned apt.conf. Adding keep_env to sudoers would work too, but neither option is done easily if there is no better support from Docker.

superm1 commented 6 years ago

Try using the --build-arg while generating the container. That's what I had to do to add http proxy

ybernat commented 6 years ago

As I said, I did even better, I have set it directly in the Dockerfile with ENV. Probably no way to make apt to use it without adding apt.conf or somehow changing sudoers to include keep_env += http_proxy

superm1 commented 6 years ago

I'll look when I get back to my workstation after the holiday. I've never had to configure anything in apt.conf in my container. Always did the only changes needed by docker build arguments.

finikorg commented 6 years ago

We can also "push" umockdev docker image to registry.