If given the option, which route do you go? I have services running in both, and I’ll often just do whats easier. I dont really notice a different in performance the configuration for containers is simple enough I don’t mind it.

I also wish there was a nix function that parsed a docker compose and used it for the oci-container config. Then I could use my existing compose files or the ones I find in docs online.

  • @tobz619@lemmy.world
    link
    fedilink
    English
    14 months ago

    I’m about to start my endeavour into docker containers on nix since there isn’t a module for the service I want.

    How do you do docker containers on nix? My early reading suggests oci-containers

    • @rutrumOPA
      link
      fedilink
      English
      14 months ago

      Yes. Oci-containers is similar to how you would setup a docker compose. Its not quite one to one. In particular, networks are odd, since you have to hand write a systemd service to create it? But thats only if you want isolated networks. You can find some examples on my github, I use it for most of my services. Heres an example of nocodb with backing postgres database. Its pretty simple: https://github.com/rutrum/dots/blob/master/hosts/modules/nocodb.nix let me know if you have questions in the future