Earlier quoted context omitted.
Not custom copies, but a locked down cache of packages. For Gentoo you can do this by locking the portage tree you use and keeping a copy of the distfiles from the first run, for Python it was a requirements.txt file with a cache of the tar files from PyPi, for go it was including 3rd party code in repo. I don't know what the team did for npm. It was really nice doing a full image rebuild and knowing the only thing t…
I'm genuinely curious about this. How are you distributing these caches so that if I do a build on my machine it'll produce the exact same image as on yours? If I'm understanding what you mean by "cache" (I'm thinking the node_modules folder for example for NPM) it'd certainly work, but it feels like a logistical nightmare to me.
Will Nix Overtake Docker?
191–200 of 259 posts
Re: Will Nix Overtake Docker?
#192Earlier quoted context omitted.
Maybe an apt comparison is git. It's just as easy to make a mistake with git today as it was however many years ago; git hasn't fundamentally changed in ways that make it easier. Git still more/less requires you to have a good understanding of what's going on in order to be comfortable using it. But, since use of git is now widespread, it's less of an issue. And the git CLI has seen some UX improvements. Nix is very…
> It's just as easy to make a mistake with git today as it was however many years ago; Pro tip from an actual pro : git became significantly easier for me once I decided 1. to just use a good comfortable gui (at least one tui also look good) for anything beyond commit and push. (maybe not everything can be done from your gui of choice but at least you get a good overview of the situation before you dive in with the c…
I do agree with you that some workflows are just easier with a GUI, since I used to use TortoiseSVN and it was much nicer for diffing two commits than the CLI is. But I haven't really dug into git GUIs.
Re: Will Nix Overtake Docker?
#193Earlier quoted context omitted.
Maybe an apt comparison is git. It's just as easy to make a mistake with git today as it was however many years ago; git hasn't fundamentally changed in ways that make it easier. Git still more/less requires you to have a good understanding of what's going on in order to be comfortable using it. But, since use of git is now widespread, it's less of an issue. And the git CLI has seen some UX improvements. Nix is very…
I avoid most git usability issues by using it as SVN. When something goes wrong I just bork the whole repo and clone it again, then manually merge the last set of saved changes.
Re: Will Nix Overtake Docker?
#194IMO initial value of docker for local development is enabling me to run two copies of postgres without them shitting on each other. I get that nix is supposed to be hermetic, but does it enable two of something? nix being really good at package management is something docker needs to imitate -- out of order apt-get without requiring a re-downloading all the packages, for example, seems like it would shrink most cloud…
This separation of concerns is one of things I like about Nix when compared to something like Docker. For instance, if you use the Docker image format for packaging, then you're also forced to buy into its specific sandboxing model. With Nix, you can choose to run applications the way you see fit.
Re: Will Nix Overtake Docker?
#195Earlier quoted context omitted.
Funny, because I feel that simple tasks that would take minutes in my machine are now a dev adventure with docker. And I mean funny. I suspect it is different mindsets. And I personally like that both seem to be thriving.
I feel similarly with Docker. But it's easier to explain to newer folks because it's only a single layer of abstraction above shell commands.
I found Nix way easier, but the documentation is very... concise.
Re: Will Nix Overtake Docker?
#196Re: Will Nix Overtake Docker?
#197Earlier quoted context omitted.
> If you want the dev team to have a strong dependency on the devops team for every little (often unpredictable) aspect of their workflow, I have never used nix, but from the article the author only concentrated on the fact that docker and nix create reproducible environments, and completely misses the other benefits of containers. As a devops guy if someone hands me a nix project, how do I deploy that so it is highl…
You can use Nix as a better docker build, see https://grahamc.com/blog/nix-and-layered-docker-images or https://nixery.dev/ .
Re: Will Nix Overtake Docker?
#198Earlier quoted context omitted.
Why do you need reproducible builds for Docker? The whole point is that you build it once and then you use that container on as many servers as you want.
What happens when you need to update some dependency within that image? Now you have to do an image rebuild. If you're lucky only the top-most layers will be rebuilt and the base layers stay the same, if you're unlucky nearly the whole image is rebuilt. Usually we just want to update some subset of dependencies, but during the rebuild some other dependencies may get updated unintentionally (eg if they aren't pinned t…
Re: Will Nix Overtake Docker?
#199Earlier quoted context omitted.
Lots of people seem to be building containers with non-Dockerfile based things though, especially in the JVM world.
You mean through maven configuration? At the end of the day it is still a dockerfile but constructed using Maven's xml. I hate it haha
Or do you mean it's conceptually the same, just implemented differently? I agree there.
Re: Will Nix Overtake Docker?
#200Along my life, i have worked with a lot of build systems, but I find Nix syntax and commands to be completely awful! I see that it could be useful, but it completely turns me down immediately.
* Primitive values (strings, numbers, paths, booleans, null)
* Lists and sets
* Variables
* Functions
* Conditionals
* Assertions
* Arithmetic operators
And that's all there is. For people familiar with programming, it should only take around 10 minutes or so to grasp the syntax. It would take much, much longer for commonly used programming languages like C, C++, Javascript, Python, Ruby, Perl, ... you name it.
The official docs does a decent job at explaining the syntax[1]. I didn't have any experience with functional languages prior, but I didn't have much problem grasping the syntax once I've read through the documentation.
[1]: https://nixos.org/manual/nix/stable/#ch-expression-language