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.examples.nix: fix documentation example #49255

Closed
wants to merge 1 commit into from

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Oct 27, 2018

The given example does not evaluate. This commit updates it to a command that works.

The given example does not evaluate. This commit updates it to a command that works.
@bhipple
Copy link
Contributor Author

bhipple commented Oct 27, 2018

CC @nlewo is this what you were going for in the example? It looks like the nix tools are not usable in the container anyways, for want of build users -- but this at least gets you into the container and lets you poke around at the filesystem with the store.

@nlewo
Copy link
Member

nlewo commented Oct 29, 2018

@bhipple what is exactly not working? Because we can query the Nix database (see the test nixos/tests/docker-tests.nix).
The purpose of the buildImageWithNixDB is to provide a clean Nix store in the container. I'm using it to build Nix builders images.

@@ -105,7 +105,8 @@ rec {
};

# 6. nix example to play with the container nix store
# docker run -it --rm nix nix-store -qR $(nix-build '<nixpkgs>' -A nix)
# docker load < $(nix-build '<nixpkgs>' -A dockerTools.examples.nix)
# docker run -it --rm nix /bin/bash
Copy link
Member

@nlewo nlewo Oct 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This no longer checks the database is well initialized. In fact, to run this command, the dockerTools.buildImage function is sufficient.

@bhipple
Copy link
Contributor Author

bhipple commented Nov 23, 2018

Hmm, for some reason the command was showing up as syntactically invalid when I tried to run it previously, but running it now it works just fine. Must've had something wrong with my zsh environment; sorry for the confusion.

@bhipple bhipple closed this Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants