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

crictl can't pull images with proxy #336

Closed
hmtai opened this issue Jul 4, 2018 · 6 comments
Closed

crictl can't pull images with proxy #336

hmtai opened this issue Jul 4, 2018 · 6 comments

Comments

@hmtai
Copy link

hmtai commented Jul 4, 2018

when I pull an image with crictl, like

crictl pull docker.io/library/alpine:latest

There was an error:

FATA[0030] pulling image failed: rpc error: code = Unknown desc = failed to resolve image "docker.io/library/alpine:latest": failed to do request: Head https://registry-1.docker.io/v2/library/alpine/manifests/latest: dial tcp 35.169.231.249:443: i/o timeout

crictl version info:

Version:  0.1.0
RuntimeName:  containerd
RuntimeVersion:  v1.1.0
RuntimeApiVersion:  v1alpha2

I have already exported http_proxy on my machine, and other commands like wget, curl works well, ctr also woks well, like:

ctr images pull docker.io/library/alpine:latest
@Random-Liu
Copy link
Contributor

Random-Liu commented Jul 6, 2018

ctr does use golang HTTP_PROXY. https://github.com/containerd/containerd/blob/master/cmd/ctr/commands/resolver.go#L88 It supports client side proxy config.

For crictl we can't support it on the client side, because CRI doesn't have a proxy parameter. However, we can support containerd daemon level HTTP_PROXY config.

I'll do it.

@feiskyer
Copy link
Member

feiskyer commented Jul 8, 2018

For crictl we can't support it on the client side, because CRI doesn't have a proxy parameter. However, we can support containerd daemon level HTTP_PROXY config.

Agreed. crictl doesn't need proxy because it only talks to local runtime's unix socket while the image is actually pulled in runtimes.

@hmtai
Copy link
Author

hmtai commented Jul 9, 2018

@Random-Liu Thanks a lot:)

@Random-Liu
Copy link
Contributor

Close.

@sipasing
Copy link

Is there any update on this or any PR that fixed this ?

@sipasing
Copy link

Never mind.. setting containerd service file as mentioned here containerd/cri#834 worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants