Hydrospheredata / hydro-serving

MLOps Platform
http://docs.hydrosphere.io
Apache License 2.0
271 stars 42 forks source link

Manager proxy setting for build containers #217

Closed KineticCookie closed 6 years ago

KineticCookie commented 6 years ago

Now I am running through this tutorial exactly. I am getting HTTP/1.1 200 OK for curl -I https://pypi.prg and https://files.pythonhosted.org. As I understand "runtime" is docker in docker container and it can't resolve proxy correctly. While standard docker build looks up for additional configs in ~/.docker/config.json file.

Originally posted by @kuzmind in https://github.com/Hydrospheredata/hydro-serving/issues/216#issuecomment-435296261

KineticCookie commented 6 years ago

Looks like docker-cli gets env variables and puts them as buildargs:

https://github.com/docker/cli/blob/6b71e84ec8bff1b8aa77353817407584cdb7d6de/cli/command/image/build.go#L622

https://github.com/docker/cli/blob/6b71e84ec8bff1b8aa77353817407584cdb7d6de/cli/config/configfile/file.go#L207-L212

KineticCookie commented 6 years ago

Hi, @kuzmind PR #218 allows the manager to read ~/.docker/config.json and forward proxy parameters to build containers. To test it out, I suggest mounting your docker config to the /root/.docker/config.json inside the manager container.