Nix-powered Docker Containers

Nix-powered Docker Containers

OpenTechLab

1 год назад

23,171 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@csilipo
@csilipo - 13.03.2024 07:12

how do you access the Website from this Video? Tried a few times, will not let me in. Carlo ( PS no register link)

Ответить
@matthewstott3493
@matthewstott3493 - 12.03.2024 16:28

For dev environments, tooling, languages, libraries, etc. You don't need to create a Docker container to accomplish things locally. For example, you can setup direnv and put a flake.nix in your project repo. When you clone the repo and change to the project directory, the flake will be run to install just what you need for the project. When you exit the project directory, the environment self-destructs and the /nix/store packages are dereferenced. When you go back into the project it will load the already installed dev env near instantly. This allows to have various incompatible environments that would not play together nicely and switch between them. You can also just spin up a nix-shell with the tooling you need. Meanwhile, building containers with Nix is still viable and useful to spin up containers in Kubernetes, etc.

Ответить
@slickheisenberg8208
@slickheisenberg8208 - 02.02.2024 17:42

I really want to like the nix approach, but the declarative nature of a Dockerfile is so much more readable and accessible.
The Nix approach seems to overcomplicate things significantly.
Maybe this cool for weekend projects, but I see the risk of wasted developers hours trying to understand the intricacies of nix, that would be quite straightforward and well documented in Docker.
Add the really bad documentation of nix and you realize that any CTO pushing nix in a productive environment will be cursed by devs that want to work on code not waste their time on their tooling.

There’s no wonder Shopify abandoned its nixos experiments.

Ответить
@adammontgomery7980
@adammontgomery7980 - 05.01.2024 05:14

Can't you just replace docker with flakes? I thought that was possible.

Ответить
@MartinCooney1
@MartinCooney1 - 25.10.2023 08:16

thanks so much for the detailed video. saved to use and review later. thanks again. more videos on Nix please are always welcome

Ответить
@adjbutler
@adjbutler - 04.10.2023 09:13

this is so funny...
I was following along (~6 months after this video was launched) and the Dockerfile build completely failed and I gave up trying to get it to work.
But the nix way worked (after a simple syntax fix of adding a missing ')' to the flake.nix file.
After that nix worked "one-shot" basically. Wow, docker confirmed not reproducible but nix is!

Ответить
@iriolavagno4060
@iriolavagno4060 - 16.09.2023 16:49

Very useful, thanks. After trying it for a few months I finally switched to NixOS in all my development enviroments. I'm still fine-tuning all the dev tools and stuff, and this video is a treasure trove of cool ideas and precious information.

Ответить
@blender_wiki
@blender_wiki - 03.09.2023 08:01

This very very useful on how convince a manger to pay you a huge bill for you consulting for something that probably he don't need. 😅😅😅

Ответить
@nevgeniev
@nevgeniev - 02.09.2023 06:49

number of layers simply unacceptable ;((

Ответить
@andreaszweili8593
@andreaszweili8593 - 28.08.2023 20:08

Nice video. What I really haven’t seen so far is packaging something like a Django or Drupal application and put that for example into a container. Especially if one doesn’t use tools like poetry2nix but rather runs poetry directly. Most of the stuff is just, here is how to package this basic C library.

Ответить
@peterromfeld4091
@peterromfeld4091 - 09.08.2023 17:38

its kinda over complicated, i dont understand the benefits of flakes if its not nixos configuration.nix, you can just pin the package tree and if you really need add overlays.

ive been building my containers with nix for the last 6 years ;)

Ответить
@oussamasethoum1665
@oussamasethoum1665 - 27.07.2023 01:09

You start building your app now, you finish it in 2099 with this stack.

Ответить
@fabianotto7749
@fabianotto7749 - 14.07.2023 15:25

awesome content, explained a lot of things I did not grok before by reading blog posts. I would suggest to setup you editor with syntax highlighting, it helps reading the nix code for the untrained eye. Please make more videos

Ответить
@skirnir393
@skirnir393 - 11.07.2023 13:35

It sounds cool on paper, but I don't think it's worth it. Man, you go from 8 lines of readable statements to more than 60 lines of gibberish. Really the syntax is ungodly . Thanks for the video.

Ответить
@Ancipital_
@Ancipital_ - 05.06.2023 00:39

I can see why people really love this channel. Great explanations. Cheers!

Ответить
@CarlosReyes-ku6ub
@CarlosReyes-ku6ub - 25.05.2023 21:33

Love Nix

Ответить
@The1zacops
@The1zacops - 01.05.2023 08:46

Thanks for showing a highly informative, yet no boiler plate, nix tutorial

Ответить
@Babbili
@Babbili - 13.04.2023 19:31

I build a jenkins docker image with nix, it wss 1.7GB 😆😆

Ответить
@IndigoVFX
@IndigoVFX - 11.04.2023 13:11

Great content, great style. I do wonder how long Nix is going to keep Flakes marked as experimental … but I agree they’re the future. I need to dive in more though.

As to the idea these images can be built for years to come, someone else in the comments touched on this but if the cache were no longer around Nix automatically goes back to sources (e.g. GitHub) … but for absolute certainty of longevity maybe you could cover automating the process of cloning sources or caches onto your own infrastructure internally and building from there?

Exact replica and reproducible builds are a huge thing where finance is concerned of course.

Ответить
@BraxtonMeyer
@BraxtonMeyer - 10.04.2023 01:06

hey otl, it's pronounced Scipio, like the roman dictator.

Ответить
@trejohnson7677
@trejohnson7677 - 05.04.2023 04:52

I hope to hell you won’t be building these images years from now.

Ответить
@maixicek
@maixicek - 03.04.2023 22:18

So it is just matter if you trust ubuntu or if you trust nix 🤣Cause dockerfile is clearly more readable and you admit it. This comparison example is not good. Like you can easily solve it by uploading your build docker image somewhere - and trust yourself that you not gonna delete it nor change it - that is when tagging and sha1 hashes comes handy, cause tag latest feels not stable. Nix is nice for that development thingy but as a docker container replacement I think no.

Ответить
@evelynescalona7267
@evelynescalona7267 - 28.03.2023 01:03

what about how to update nixos? thanks!!!

Ответить
@chai116
@chai116 - 27.03.2023 05:43

I'm fully onboard with the Nix way. It's a big improvement! But one thing I'm still concerned with when discussing "reproducibility years into the future"-- and that's the source files. If you can't get derivations from the binary cache, often the fallback is building from source, and those sources can still disappear from the internet. The github repo could be deleted, or a server could change a base url, etc. It would be great to be able to vendor sources when that's desired.

Ответить
@aliabdulla2702
@aliabdulla2702 - 22.03.2023 11:16

I am very happy to see you again. good luck.👍

Ответить
@bereknyei
@bereknyei - 22.03.2023 00:10

I've been looking at some enhancements to the nix to container conversions where one would have greater control over the layers and how they were composed. Another angle is to teach the container ecosystem about "nix layers" that are known to be non-conflicting, and thus don't have the performance overhead of overlayfs, limit to 128 layers, can be processed in parallel, etc.

Ответить
@DrKnow65
@DrKnow65 - 21.03.2023 15:53

I am so glad you are following up with Nix again, I have not made the time yet to pour into a deeper understanding. I am curious about the size of programs if they need to bring along their own dependencies, how much Nix relies on internet access, and how it would work if one wanted to modify a package to use an additional library (say for a specific sensor in a logging app).

Ответить
@jandillingh
@jandillingh - 21.03.2023 14:47

I'm really enjoying this new style of video.
You're surprisingly good on camera imo :)

Ответить