• trevor (he/they)@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            9
            arrow-down
            1
            ·
            2 days ago

            The biggest downside to containers vs. Nix for me is that Nix can produce binaries for Linux and macOS, whereas docker only helps with Linux unless you can perform literal magic to cross-compile your project on Linux for macOS.

            Containers also don’t give you reproducible environments, and Nix does.

            That said, Nix documentation is ass, so I usually end up going with containers because they require far less suffering to get working because writing a containerfile is much easier than guessing how to hobble together a Nix flake with a mostly undocumented language.

            • utopiah@lemmy.ml
              link
              fedilink
              arrow-up
              1
              ·
              24 hours ago

              Feels very arbitrary. Why would I care about say MacOS versus FreeBSD or say NeXTSTEP (just to be provocative)?

              Anyway I’m being pulled away from the actual argument, the “bare metal” argument is about performances, isn’t it?

                • utopiah@lemmy.ml
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  11 hours ago

                  What I mean is that MacOS is proprietary and runs on specific hardware, it’s by design not meant to be interoperable so it’s not “just” popularity.

            • atzanteol@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              3
              arrow-down
              1
              ·
              1 day ago

              Containers also don’t give you reproducible environments, and Nix does.

              Of course it does. 🙄

                • atzanteol@sh.itjust.works
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  arrow-down
                  1
                  ·
                  edit-2
                  1 day ago
                  docker build . -t docker.company.com/build-env:1.0 && docker push docker.company.com/build-env:1.0
                  

                  But for like 99% of development teams “repeatable” is Good Enough™.

                  • trevor (he/they)@lemmy.blahaj.zone
                    link
                    fedilink
                    English
                    arrow-up
                    5
                    arrow-down
                    1
                    ·
                    edit-2
                    1 day ago

                    So, containers do not get you reproducibility.

                    For dev environments, repeatable is okay. If you want actually reproducible binaries that you can ship, Nix is better fit for that purpose.

          • Mihies@programming.dev
            link
            fedilink
            arrow-up
            1
            ·
            2 days ago

            It could if there are issues accessing hardware directly. Overhead is, as you said, not that important.