• pmk@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days ago

    Recently I was reading a discussion that docker solves a linux problem, and therefore isn’t needed in the BSD projects. But then some other people disagreed. If there was only one linux distribution, say debian, do you think docker would be needed? This is not a rhetorical question, I’m genuinely wondering what you think.

    • moonpiedumplings@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      15 hours ago

      Kinda. I think it’s definitely true that docker is used as a distro-agnostic package manager for services, and if we only had one distro we might not need that.

      It should be noted that projects like cosmo attempt to make things portable to and across BSD’s as well as Linux’s, so people definitely want distro agnostic packages (or a package manager), even on the BSD operating systems.

      However, on the other end, docker is also powerful because it (and tools that use docker containers, like kubernetes), orchestrate services and allow people to bring them up very, very quickly. Like, to bring up a service called pairdrop, I just take this file:

      ---
      services:
        pairdrop:
          image: lscr.io/linuxserver/pairdrop:latest
          container_name: pairdrop
          environment:
            - PUID=1000
            - PGID=1000
            - TZ=Etc/UTC
            - RATE_LIMIT=false #optional
            - WS_FALLBACK=false #optional
            - RTC_CONFIG= #optional
            - DEBUG_MODE=false #optional
          ports:
            - 3000:3000
          restart: unless-stopped
      

      and type docker-compose up -d. And it’s really quick, and arguably only possible due to the way containers are isolated and it’s easy to create and destroy them. There exist solutions for automation and scripting like ansible, but they just aren’t as good as the container solutions for automatically putting services up.