dobi icon indicating copy to clipboard operation
dobi copied to clipboard

Proxy setting from~/.docker/config.json ignored

Open sbrt opened this issue 5 years ago • 1 comments

Running the example under dobi/examples/project-setup with dobi app on a host that is behind a proxy server, docker fails during fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz. When building with docker build ., the docker builds using my proxy settings from ~/.docker/config.json

When I set the HTTP_PROXY environmental variable in the Dockerfile like so....

FROM    alpine:3.4
ENV HTTP_PROXY "<proxy>"
RUN     apk -U add bash
COPY    setup.sh /usr/bin/setup.sh
WORKDIR /code
CMD     ["/usr/bin/setup.sh"]

... and run again dobi app, everything works.

Hence, dobi ignores the docker proxy settings in ~/.docker/config.json.

This impacts portability a bit, if all Dockerfiles have to be modified with proxy settings.

Other than that, thanks a lot for the great tool :-)

sbrt avatar May 23 '20 10:05 sbrt

Thank you for the report! I think this sounds related to #189 in some ways.

I believe because the go-dockerclient version that is being used is so old it doesn't know about the ~/.docker/config.json. It's still expecting the old path ~/.dockercfg. I'm not sure if it supports proxy settings either.

Updating the dockerclient or changing to use the official docker one may fix the problem.

dnephin avatar Jun 04 '20 04:06 dnephin