-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
dockerTools.pullImage
fails to pull image when behind corporate proxy
#29271
Comments
The issue appears to be the new tooling starts a QEMU VM and also inherits the impure environment variables. However, the HTTP(S) proxy variables point to 127.0.0.1, which obviously doesn't work when inherited inside the VM, as the VM isn't running a CNTLM proxy at 3128. |
cc @matejc what would you think about rewriting image pulling to use Skopeo? |
@kuznero can you try with |
Yeah, I am not fond of my qemu solution either and skopeo looks nice. If I knew about it back then, I would probably used it. Project is maintained and works (just tried loading image into docker downloaded from docker registry with skopeo). |
Also: A test would be nice to have once implemented, I hope I am not asking too much :) |
@nlewo It does not pull image with your expression. Here is what I get:
On the other side pulling an image explicitly works as expected:
And in case it might help here is the output for
|
Just went through downgrading from 17.09 (beta) to latest 17.03 and tried again - all works as expected. |
@kuznero arf, sorry, I forgot to propagate the http proxy env variable...
|
@nlewo I still have one instance with 17.09 - will try tomorrow and let you know if it works for me. |
@nlewo your expression worked on 17.09 with minor change - sha256 needed to be different. Otherwise, here is how it looked:
|
@kuznero You can clone nixpkgs repository and try by using it, such as
|
REgarding the hash, each time a new ubuntu image is pushed, the sha has to be upgraded. It seems they have pushed a new image this nigth (the yesterday hash doesn't work for me anymore). |
@nlewo I have downgraded my main dev server for now and will not be running tests on 17.09 until the fix is available through 17.09. Do you think the fix can be done using your approach with skopeo instead of qemu and do you know who will be likely to do this change? |
@kuznero I'm on it. |
Before this patch, a VM was used to spawn docker that pulled the VM. Now, the tool Skopeo does this job well so we can simplify our dockerTools since we doesn't need Docker anymore:) This also fixe the regression described in NixOS#29271 : cntlm proxy doesn't work in 17.09 while it worked in 17.03. Note Skopeo doesn't produce the same output than docker pull so, we have to update sha.
Before this patch, a VM was used to spawn docker that pulled the VM. Now, the tool Skopeo does this job well so we can simplify our dockerTools since we doesn't need Docker anymore:) This also fixe the regression described in #29271 : cntlm proxy doesn't work in 17.09 while it worked in 17.03. Note Skopeo doesn't produce the same output than docker pull so, we have to update sha.
Before this patch, a VM was used to spawn docker that pulled the VM. Now, the tool Skopeo does this job well so we can simplify our dockerTools since we doesn't need Docker anymore:) This also fixe the regression described in #29271 : cntlm proxy doesn't work in 17.09 while it worked in 17.03. Note Skopeo doesn't produce the same output than docker pull so, we have to update sha. (cherry picked from commit 01174c5) Signed-off-by: Domen Kožar <domen@dev.si>
@domenkozar Sorry for potentially lame question - is this fix available in 17.09 beta channel by now? And how can I check such things myself? |
@kuznero I guess if the commit is in https://github.com/NixOS/nixpkgs-channels/tree/nixos-17.09 , it is then available from the channel. Maybe there is also another way to do this check:) |
@nlewo @domenkozar This is what I get now with the change committed into 17.09:
It seems that now it is downloading the image correctly, but fails further with: GitHub repository to reproduce on. |
@kuznero I think this issue is not related to the previous one, so it would have been better to open a new one :) I think the problem comes with your base image but it has been updated. So if you could update it:
And maybe this will solve your issue. |
@nlewo it fails with the following trace:
Will open a new issue. |
Before this patch, a VM was used to spawn docker that pulled the VM. Now, the tool Skopeo does this job well so we can simplify our dockerTools since we doesn't need Docker anymore:) This also fixe the regression described in NixOS#29271 : cntlm proxy doesn't work in 17.09 while it worked in 17.03.
Issue description
Git repository with problem to reproduce is here.
nix-build docker.nix
fails todockerTools.pullImage
and gives the following error:Technical details
My developer OS setup is behind corporate proxy (I am using Cntlm for that), thus occurencies of
127.0.0.1:3128
.I have recently switched to channel 17.09.
Might be related to recent change done to pull.nix.
The text was updated successfully, but these errors were encountered: