• lemmyvore
    link
    fedilink
    English
    361 year ago

    Docker. It’s been around longer, it’s more polished, easier to learn, simpler to use, supported everywhere and by everything, easy to find solutions when you search for help, doesn’t depend on systemd, compatible with every container image out there, and you can do things with it even if it’s not the “correct” way to do it while podman will tell you “no, you can’t do that”.

  • @[email protected]
    link
    fedilink
    English
    171 year ago

    Podman, rootless containers work well, and there is no central process running everything. I like that starting containers on boot is integrated with systemd.

  • azdle
    link
    fedilink
    English
    171 year ago

    If your distro offers it, rootless podman + podman system service is the best setup, IMO. That will give you a docker command that is 1-to-1 compatible with docker and lets you use tools like docker-compose that expect a docker service socket. Then you can just follow tutorials that only explain things for docker.

    • lemmyvore
      link
      fedilink
      English
      21 year ago

      What is rootless bring brought up so much? It’s a container, it’s isolated from the host anyway, what does it matter what user runs inside? And if something breaks into the container they can trash the app in it and the shared volumes anyway, even if they’re not root.

      • azdle
        link
        fedilink
        English
        6
        edit-2
        1 year ago

        Defense in depth. If something escapes the container it’s limited to only what’s under that user and not the whole system. Having access to the whole system makes it easier for malware to hide/persist itself.

        • lemmyvore
          link
          fedilink
          English
          21 year ago

          Correct me if I’m wrong but containerization is enforced by the kernel, correct? If something escapes you’re pretty much screwed anyway.

          • Atemu
            link
            fedilink
            English
            41 year ago

            There are many layers involved in preventing escapes from containers.

          • @[email protected]
            link
            fedilink
            English
            21 year ago

            Way too dependent on the setup, a container with absolutely no outside access theoretically just has the kernel, but usually we want to communicate with our docker images not just run them

      • @[email protected]
        link
        fedilink
        English
        41 year ago

        Because a container is only as isolated from the host as you want it to be.

        Suppose you run a container and mount the entire filesystem into it. If that container is running as root, it can then read and write anything it likes (including password databases and /etc/sudo)

        • lemmyvore
          link
          fedilink
          English
          11 year ago

          So what? If I mount / in the container and choose to run it as root that’s my business. Why would the containerization engine second-guess what I’m doing?

          How would you like it if sudo told you “I can’t let you be root, you could read and write anything you like, including password databases and /etc/sudo”?

          • @[email protected]
            link
            fedilink
            English
            41 year ago

            Nothing to stop running podman containers with full root access by creating & running them as root, you run them as whatever user you want. I’ve done it to troubleshoot containers on more than one occasion, usually when I want to play with VPN or privileged ports but too lazy to do it proper. The end goal for a lot of ppl, including myself, is to run as many things as non-root as possible. Why? Best practices around security have you give a service the minimal access & resources it needs to do it’s tasks. Some people allow traffic from the internet to their containers & they probably feel a little bit safer running those programs as non-root since it can create an extra layer that may need to be broken to fully compromise a system.

          • @[email protected]
            link
            fedilink
            English
            2
            edit-2
            1 year ago

            The point is to minimize privilege to the least possible - not to make it impossible to create higher privileged containers. If a container doesn’t need to get direct raw hardware access, manage low ports on the host network, etc. then why should I give it root and let it be able to do those things? Mapping it to a user, controlling what resources it has access to, and restricting it’s capabilities means that in the event that my container gets compromised, my entire host isn’t necessarily screwed.

            We’re not saying “sudo shouldn’t be able to run as root” but that “by default things shouldn’t be run with sudo - and you need a compelling reason to swap over when you do”

    • @[email protected]
      link
      fedilink
      English
      11 year ago

      will it let you do rootless nfs mounts into the container? That’s the showstopper for me, as that is by far the best way to just make this all work within the context of my file storage.

    • @[email protected]
      link
      fedilink
      English
      11 year ago

      My only issue with rootless is that SWAG doesn’t work with it, otherwise my other containers could be rootless. However, I heard connecting rootful and rootless containers is impossible so all my containers are rootful right now.

    • deadcatbounce
      link
      fedilink
      English
      41 year ago

      This is the best advice. Bloody hard for me to do, however. Not sure why.

      • lemmyvore
        link
        fedilink
        English
        21 year ago

        Except in real life you’ll run into images that podman refuses to work with all the time.

        • krolden
          link
          fedilink
          English
          21 year ago

          Example? Ive definitely had compose projects that I had a hard time running with podman but all the individual containers seem to work just fine.

          • lemmyvore
            link
            fedilink
            English
            21 year ago

            How do you make podman run an image that runs as an uid/gid that don’t exist on the host and needs to access host devices/volumes owned by uid/gid that don’t exist in the container?

  • Max-P
    link
    fedilink
    English
    61 year ago

    I’d go Docker for the maturity. Podman is nice but I’ve definitely had some issues, and Buildah lacks any sort of caching and does unnecessary intermediate copies of the layers when pushing to a repository that really slows things down on larger apps/images.

  • Possibly linux
    link
    fedilink
    English
    31 year ago

    Docker if you are unsure how to begin. You can use docker compose with configs you find on the internet.

    If your interested in podman I would start by using it though distrobox. Distrobox is a tool that allows other Linux environments on your host system and is really good for development

  • @[email protected]
    link
    fedilink
    English
    21 year ago

    A year or two ago (whenever docker changed the business license of docker for Mac) I changed to podman and aliased docker=podman. It behaves the same, you would just about never know rootful podman vs docker.

    Rootless podman is super cool and a much better security ideal - but comparing more apples to apples would be podman running as root vs docker.

  • Cyclohexane
    link
    fedilink
    English
    21 year ago

    I use podman, even when I started out. But I am a tinkerer. I think for the average beginner, docker will be easier as so much out there assumes you are using Docker only, and hard codes it. Unless you wanna deal with that, use Docker.

  • @[email protected]
    link
    fedilink
    English
    21 year ago

    Docker because it just works. Podman has another 5 years (hopefully) to get this part right IMO.

  • @[email protected]
    link
    fedilink
    English
    21 year ago

    I started with Docker and then migrated to Podman for the integrated Cockpit dashboard support. All my docker-compose files work transparently on top of rootful Podman so the migration was relatively easy. Things get finicky when you try to go rootless though.

    I say try both. Rootful podman is gonna be closest to the Docker experience.