I would love to hear everyone’s opinion.

  • Ledivin@lemmy.world
    link
    fedilink
    English
    arrow-up
    38
    arrow-down
    1
    ·
    6 months ago

    If you don’t have strong opinions one way or the other, then docker is the easy answer. Way, way more widespread, which generally tends to mean better docs, more guides and examples, more tooling and open-source support…

  • Molecular0079@lemmy.world
    link
    fedilink
    English
    arrow-up
    21
    arrow-down
    1
    ·
    6 months ago

    I use podman with the podman-docker compatibility layer and native docker-compose. Podman + podman-docker is a drop-in replacement for actual docker. You can run all the regular docker commands and it will work. If you run it as rootful, it behaves in exactly the same way. Docker-compose will work right on top of it.

    I prefer this over native Docker because I get the best of both worlds. All the tutorials and guides for Docker work just fine, but at the same time I can explore Podman’s rootless containers. Plus I enjoy it’s integration with Cockpit.

  • rentar42@kbin.social
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    edit-2
    6 months ago

    I personally prefer podman, due to its rootless mode being “more default” than in docker (rootless docker works, but it’s basically an afterthought).

    That being said: there’s just so many tutorials, tools and other resources that assume docker by default that starting with docker is definitely the less cumbersome approach. It’s not that podman is signficantly harder or has many big differences, but all the tutorials are basically written with docker as the first target in mind.

    In my homelab the progression was docker -> rootless docker -> podman and the last step isn’t fully done yet, so I’m currently running a mix of rootless docker and podman.

  • sudneo@lemmy.world
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    5
    ·
    6 months ago

    I would say Docker. There is no substantial benefit in running podman, while docker is a widely adopted tool (which means more tooling in the ecosystem, easier to find answers to questions etc.). The difference is not huge tbh, and some time ago the biggest advantage for podman was being able to run rootless, while docker was stuck with a root daemon. This is not the case anymore (docker can run rootless), so I would say unless you have some specific argument to use podman, stick with docker.

  • Dandroid@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    ·
    6 months ago

    I like podman because rootless and daemonless are built-in and default. Yes, it can be done on docker, but you have to do a bunch of shit to get it set up.

    You could create the alias alias docker="podman" and 99% of the time, you won’t even be able to tell the difference since podman is a docker drop in replacement. All the docker documentation applies to podman as well. But since docker runs as root by default, some edge cases might not work out of the box (like binding to a port on the host less than 1000).

    Podman comes with some neat tools like being able to create systemd service files to start and stop containers as services.

    To use docker-compose, you’ll need some additional packages. That’s probably the biggest drawback to podman imo. Podman wants to use pods instead of docker-compose, but I think they gotta take their heads out of their asses and just support the more popular format on that one. Not to mention docker-compose is just plain better imo. Easier to define, easier to understand, easier to modify. The list goes on and on.

  • Static_Rocket@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    edit-2
    6 months ago

    It depends on what you want. Do you want containers that don’t blow away your firewall? Podman is nice, but docker can be configured a little to avoid this. Want things that autostart and don’t have issues with entry points that attempt to play with permissions/users? Docker or podman as root is necessary. Want reasonable compose support? Podman now needs a daemon/socket. Want to make build containers and not deal with permission/user remapping at all? Podman is really nice.

    Do not attempt to use podman-compose. That app is dead.

    Unfortunately if you want to make tools that will be used by other people then you must add docker support. It just owns too much of the market.

  • lemmyvore@feddit.nl
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    6 months ago

    If you’re just starting out and have never used containers before start with regular (rootful) docker. It’s a much simpler mechanism to understand for a beginner and has more widespread support and documentation.

    Once you understand containers and have used them for a few months you can start going down the rabbit hole, there’s no shortage of technologies to explore.

    Or, if you’re only interested in self-hosting as a hobby and docker does what you need, you can also stop there. Not everybody needs a deep dive into technology.

  • Politically Incorrect@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    6 months ago

    I use Docker and it works for what I use it so I have no need to change it, maybe if in the future I have the need to use podman I would consider to change. But right now I’m not interested.

  • ramble81@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    6 months ago

    Piggybacking on this… what’s the quickest way to deploy a docker container in Kubernetes short of having to hand create the deployment yaml? Or is that it, having to create one from scratch.

    • sudneo@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      6 months ago

      You have a bunch of options:

      kubectl run $NAME --image=$IMAGE
      

      this just creates a pod running the specific image. If you kill the pod, or it terminates, it won’t be run again. In general though, you probably want to do some customization before running (maybe you need volumes, secrets, env, ports, labels, securityContext, etc.) and for that you can simply let kubectl generate the boilerplate YAML and then simply make some edit:

      kubectl run $NAME --image=$IMAGE --dry-run=client -o yaml > mypod.yaml
      # edit mypod.yaml
      kubectl create -f mypod.yaml
      

      You can do the same with a deployment or statefulset:

      kubectl create deployment $NAME -n $NAMESPACE [...] --dry-run=client -o yaml > deployment.yaml
      

      In case you don’t need anything fancy, the kubectl create subcommand allows you to create simple workload, so probably that’s the answer to your question.

      • ramble81@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        You rock! Yeah I just wanted to run the image first before building out the whole framework around it. This is what I was looking for.

  • rizoid@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    Docker is a great choice with lots of good tutorials. I personally use podman since all my servers are now running Fedora server and podman is installed by default.

    • sudneo@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      Because the lxc way is inherently different from the docker/podman way. It’s aimed at running full systems, rather than mono process containers. It has it’s use cases, but they are not as common IMHO.

      • genie@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        5
        ·
        6 months ago

        Real men use Incus NixOS containers for reproducible builds instead of wimpy dockerfiles 😤😤

        /s – for real though, I hope someday you finally remove the stick from where the sun doesn’t shine ;)

        • sudneo@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          6 months ago

          Did it sound cold? Because I didn’t mean that, I just meant to actually answer the question from my PoV. Just for the record, I also did not down vote you.

          So yeah, use whatever footgun you prefer, I don’t judge :)

    • sudneo@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      6 months ago

      I think k8s is a different beast, that requires way more domain specific knowledge besides server/Linux basic administration. I do run it, but it’s an evolution of a need, specifically when you want to manage a fleet of machines running containers.

      • adr1an@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        6 months ago

        Even then, there’s dockerswarm.rocks (linking directly to tutorial to show how easy it is!)

        • derpgon@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 months ago

          This website is deprecated.

          It’s kept around mainly for historical reasons.

          I’ve tried Docker Swarm because Kubernetes seemed like an overkill for a cluster of 4 small-ish servers. There have been several issues (networking for example) that took me two days to solve - by reinstalling the machine completely.

          There are some hoops and hurdles along the way, some command will just literally brick your cluster without any notice whatsoever (like removing the second manager, leaving only one and cluster stops responding, but you get no warning that’s gonna happen).

          Also secrets, where there is no simple way to manage them, or replace them. You can’t just replace a secret, you have to remove and recreate it. Which means turning off the service or creating a new secret with a different name and do a rolling update, which is just annoying to do every time unless you can afford a robust CI CD pipeline code that does it automatically.

        • sudneo@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 months ago

          I really thought swarm was dead :)

          To be honest, some kubernetes distributions make the cluster operations minimal (I use k0s managed via ansible)!

          Either way, the moment you go from N containers on one box to N containers on M boxes you need to start considering how to handle stateful applications, load balancing, etc. And that in general requires knowledge on a domain which is different from having simply applications wrapped in containers locally.

  • kevincox@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    4
    ·
    6 months ago

    I would say podman by default. It has a better security architecture as it can run rootless.

    However there are small differences from Docker so you may need use Docker if you are trying to run third-party services that rely on these differences.