Skip to content
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

devspace does not honor users .docker/config.json settings #1378

Closed
wadeholler opened this issue Mar 29, 2021 · 3 comments
Closed

devspace does not honor users .docker/config.json settings #1378

wadeholler opened this issue Mar 29, 2021 · 3 comments
Assignees
Labels
area/building-images Issues related to building Docker images kind/bug Something isn't working

Comments

@wadeholler
Copy link

What happened?
Background: I sit behind a corporate proxy. I run cntlm locally to interface with the direct, authenticated corporate proxy. I use custom ~/.docker/config.json settings to allow spawned containers to also contact the local cntlm proxy - thereby enabling access through corporate proxy to external resources.

A Dockerfile which uses yum install, pip install, etc works with a normal docker build command but fails to contact the local proxy when devspace build is ran.

What did you expect to happen instead?

I expected devspace to invoke docker commands such that ~/.docker/config.json was honored

How can we reproduce the bug? (as minimally and precisely as possible)

reference config above.

Work around is to set ENV in Dockerfile, then unset before end of docker file.

example Dockerfile snippet:

...
ENV HTTP_PROXY=http://172.17.0.1:3128
ENV https_proxy=http://172.17.0.1:3128
ENV http_proxy=http://172.17.0.1:3128
ENV HTTPS_PROXY=http://172.17.0.1:3128

COPY kubernetes.repo /etc/yum.repos.d/kubernetes.repo
RUN yum install -y java-1.7.0-openjdk git maven python2 python3 kubectl
COPY pip.conf /etc/pip.conf
RUN pip3 install awscli 

ENV HTTP_PROXY=
ENV https_proxy=
ENV http_proxy=
ENV HTTPS_PROXY=
...

Local Environment:

  • DevSpace Version: 5.10.0
  • Operating System: linux
  • Deployment method: helm / component chart

Kubernetes Cluster:

  • Cloud Provider: other/self
  • Kubernetes Version: 1.18.4

Anything else we need to know?
NA

/kind bug

@FabianKramm
Copy link
Collaborator

FabianKramm commented Mar 30, 2021

@wadeholler thanks a lot for creating this issue! Yes you are correct, seems like we do not use the exact same parameters as docker itself does, but we can correct that! However, it currently should already work if you tell devspace to use the docker cli directly, in which case you don't need to modify the Dockerfile:

images:
  backend:
    image: myrepo/test
    build:
      docker:
        useCli: true

@FabianKramm FabianKramm self-assigned this Mar 30, 2021
@FabianKramm FabianKramm added area/building-images Issues related to building Docker images kind/bug Something isn't working labels Mar 30, 2021
@wadeholler
Copy link
Author

That (useCli) worked great. Thank you!

@FabianKramm
Copy link
Collaborator

@wadeholler this was fixed with v5.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/building-images Issues related to building Docker images kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants