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

dockerTools.pullImage: change the docker deamon readiness mechanism #28963

Merged
merged 1 commit into from Sep 13, 2017

Conversation

nlewo
Copy link
Member

@nlewo nlewo commented Sep 4, 2017

Motivation for this change

To wait for the docker deamon, curl requests are sent. However, if a
http proxy is set, it will respond instead of the docker daemon. The script will then fail because docker is not up and running.
To avoid this, we send docker ps command instead of curl command.

Things done

I successfully pull ubuntu images and also run the nixpkgs docker example:

nix-build ./ -A nix-build ./ -A dockerTools.examples.nix
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

To wait for the docker deamon, curl requests are sent. However, if a
http proxy is set, it will respond instead of the docker daemon.
To avoid this, we send docker ps command instead of curl command.
@mention-bot
Copy link

@nlewo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @lethalman, @matejc and @0arthur to be potential reviewers.

@nlewo
Copy link
Member Author

nlewo commented Sep 11, 2017

@globin @Mic92 could you please have a look?
Moreover, would it be possible to cherry-pick this patch in the 17.09 branch?

@nlewo
Copy link
Member Author

nlewo commented Sep 13, 2017

If #29302 is merged, this PR is useless.

@Mic92 Mic92 merged commit 9e7db9a into NixOS:master Sep 13, 2017
@Mic92
Copy link
Member

Mic92 commented Sep 13, 2017

I will merge this one in the meantime and backport it. For the other I need some more time to review.

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

Successfully merging this pull request may close these issues.

None yet

4 participants