-
-
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
Add Dockerfile, which builds docker with nix package manager #4642
Conversation
@offlinehacker you think you can create a NixOS account and manage it for now? i guess you're the biggest docker+nix user |
I can create nixos docker account if others are fine with that(i can share login info)? @edolstra @rbvermaa @iElectric ? |
46dc9f1
to
1ad0d0a
Compare
@offlinehacker I'm fine with you creating a nixos account if you keep the image up-to-date. |
@offlinehacker Can we put the Dockerfile somewhere else than the root of nixpkgs? |
@rbvermaa as far as i know yes, where do you think it should be put, maybe in top-level because it is nixpkgs related and not nixos? keeping up-to-date is a matter of pushing a button on docker hub, and even this could be automated if a branch would be updated on unstable release, this would be really usefull. |
@offlinehacker How about in maintainers/docker/ subdirectory? |
Merged, in subdirectory |
I will reopen this pull request, because this dockerfile needs some tunning, i'm working on kubernetes nixos module, so after extensive testing i will make required modifications and report back what's the best way of running nixpkgs/nixos on docker like clouds. |
Oh no, think about the "open pull request" count! ;-) |
Let me know if this should be part of 14.11 release |
@offlinehacker So, are there any outstanding changes here? I guess minor changes should be committed directly, and a PR without any changes should be closed. An issue could be created in its place, if needed. |
FROM busybox | ||
|
||
RUN dir=`mktemp -d` && trap 'rm -rf "$dir"' EXIT && \ | ||
wget -O- http://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2 | bzcat | tar x -C $dir && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be updated for Nix 1.8. Also, why not simply use the install procedure curl https://nixos.org/nix/install | sh
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's even proper way to run nix with docker, I'm working on
service abstraction layer that would make declarative docker containers
possible.
On Jan 23, 2015 11:53 PM, "Wout Mertens" [email protected] wrote:
In Dockerfile
#4642 (comment):@@ -0,0 +1,12 @@
+FROM busybox
+
+RUN dir=mktemp -d
&& trap 'rm -rf "$dir"' EXIT && \
- wget -O- http://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2 | bzcat | tar x -C $dir && \
This needs to be updated for Nix 1.8. Also, why not simply use the install
procedure curl https://nixos.org/nix/install | sh?—
Reply to this email directly or view it on GitHub
https://github.com/NixOS/nixpkgs/pull/4642/files#r23486704.
This is in nix now |
Using a very simple Dockerfile, I get an error that seems to indicate
|
With this Dockerfile, https://registry.hub.docker.com/u/offlinehacker/nixpkgs will automaticlly build docker image with nix package manager and nixpkgs(repo itself) on every push. To use this docker image: docker -t -i offlinehacker/nixpkgs. I advise nixos organization to create it's own account on docker registry and setup automated builds.
Example Dockefile that uses this image:
PS: Docker is not a replacement for nixos, docker is process manager(which can also run whole nixos container), nixos is os, just to make this clear.