Hi! Question in the title.

I get that its super easy to setup. But its really worthwhile to have something that:

  • runs everything as root (not many well built images with proper useranagement it seems)
  • you cannot really know which stuff is in the images: you must trust who built it
  • lots of mess in the system (mounts, fake networks, rules…)

I always host on bare metal when I can, but sometimes (immich, I look at you!) Seems almost impossible.

I get docker in a work environment, but on self hosted? Is it really worth while? I would like to hear your opinions fellow hosters.

  • @corroded@lemmy.world
    link
    fedilink
    English
    -11 year ago

    My personal opinion is that Docker just makes things more difficult. Containers are fantastic, and I use plenty of them, but Docker is just one way to implement containers, and a bad one. I have a server that runs Proxmox; if I need to set up a new service, I just spin up a LXC and install what I need to. It gives all the advantages of a full Linux installation without taking up the resources of a full-fledged OS. With Docker, I would need a VM running the docker host, then I’d have to install my docker containers inside this host, then forward any ports or resources between the hypervisor, docker host, and docker container.

    I just don’t get the use-case for Docker. As far as I can tell, all it does is add another layer of complexity between the host machine and the container.

    • @Sethayy@sh.itjust.works
      link
      fedilink
      English
      21 year ago

      Though this is more of a proxmox ease of use issue than docker, personally I swapped from it to pure debian server/host to run a similar manual setup with podman - so everything runs right on the host.

      In theory I think you can achieve this with proxmox ssh’ing into the host and just treating it like a usual debian

  • @specseaweed@lemmy.world
    link
    fedilink
    English
    41 year ago

    I know enough to be dangerous. I know enough to follow faqs but dumb enough to not backup like I should.

    So I’d be running my server on bare metal and have a couple services going and sooner or later, shit would get borked. Shit that was miles past my competence to fix. Sometimes I’d set up a DB wrong, or break it, or an update would screw it up, and then it would all fall apart and I’m there cursing and wiping and starting all over.

    Docker fixes that completely. It’s not perfect, but it has drastically lowered my time working on my server.

    My server used to be a hobby that I loved dumping hours into. Now, I just want shit to work.

  • Possibly linux
    link
    fedilink
    English
    91 year ago

    Well docker tends to be more secure if you configure it right. As far as images go it really is just a matter of getting your images from official sources. If there isn’t a image already available you can make one.

    The big advantage to containers is that they are highly reproducible. You no longer need to worry about issues that arise when running on the host directly.

    Also if you are looking for a container runtime that runs as a local user you should check out podman. Podman works very similarly to docker and can even run your containers as a systemd user service.

  • bluGill
    link
    fedilink
    31 year ago

    Docker gives you a few different things which might or might not matter. Note that all of the following can be gotten in ways other than docker as well. Sometimes those ways are better, but often what is better is just opinion. There are downsides to some of the following as well that may not be obvious.

    With docker you can take a container and roll it out to 100s of different machines quickly. this is great for scaling if your application can scale that way.

    With docker you can run two services on the same machine that use incompatible versions of some library. It isn’t unheard of to try to upgrade your system and discover something you need isn’t compatible with the new library, while something else you need to upgrade needs the new library. Docker means each service gets separate copies of what is needs and when you upgrade one you can leave the other behind.

    With docker you can test an upgrade and then when you roll it out know you are rolling out the same thing everywhere.

    With docker you can move a service from one machine to a different one somewhat easily if needed. Either to save money on servers, or to use more as more power is needed. Since the service itself is in a docker you can just start the container elsewhere and change pointers.

    With docker if someone does manage to break into a container they probably cannot break into other containers running on the same system. (if this is a worry you need to do more risk assessment, they can still do plenty of damage)

  • ☂️-
    link
    fedilink
    English
    361 year ago

    people are rebuffing the criticism already.

    heres the main advantage imo:

    no messy system or leftovers. some programs use directories all over the place and it gets annoying fast if you host many services. sometimes you will have some issue that requires you to do quite a bit of hunting and redoing things.

    docker makes this painless. you can deploy and redeploy stuff easily and quickly, without a mess. updates are painless and quick too, with everything neatly self-contained.

    much easier to maintain once you get the hang of things.

    • million
      link
      fedilink
      English
      21 year ago

      Quick addition, I think for the messy argument the way I would articulate it for folks running servers is it helps you move from pets to cattle.

  • @aleq@lemmy.world
    link
    fedilink
    English
    51 year ago

    the biggest selling point for me is that I’ll have a mounted folder or two, a shell script for creating the container, and then if I want to move the service to a new computer I just move these files/folders and run the script. it’s awesome. the initial setup is also a lot easier because all dependencies and stuff are bundled with the app.

    in short, it’s basically the exe-file of the server world

    runs everything as root (not many well built images with proper useranagement it seems)

    that’s true I guess, but for the most part shit’s stuck inside the container anyway so how much does it really matter?

    you cannot really know which stuff is in the images: you must trust who built it

    you kinda can, reading a Dockerfile is pretty much like reading a very basic shell script for the most part. regardless, I do trust most creators of images I use. most of the images I have running are either created by the people who made the app, or official docker images. if I trust them enough to run their apps, why wouldn’t I trust their images?

    lots of mess in the system (mounts, fake networks, rules…)

    that’s sort of the point, isn’t it? stuff is isolated

  • @eluvatar@programming.dev
    link
    fedilink
    English
    31 year ago

    About the trust issue. There’s no more or less trust than running on bare metal. Sure you could compile everything from source but you probably won’t, and you might trust your distro package manager, but that still has a similar problem.

  • @MartianSands@sh.itjust.works
    link
    fedilink
    English
    191 year ago

    I find it makes my life easier, personally, because I can set up and tear down environments I’m playing with easily.

    As for your user & permissions concern, are you aware that docker these days can be configured to map “root” in the container to a different user? Personally I prefer to use podman though, which doesn’t have that problem to begin with

    • @micka190@lemmy.world
      link
      fedilink
      English
      2
      edit-2
      1 year ago

      I find it makes my life easier, personally, because I can set up and tear down environments I’m playing with easily.

      Same here. I self-host a bunch of dev tools for my personal toy projects, and I decided to migrate from Drone CI to Woodpecker CI this week. Didn’t have to worry about uninstalling anything, learning what commands I need to start/stop/restart Woodpecker properly, etc. I just commented-out my Drone CI/Runner services from my docker-compose file, added the Woodpecker stuff, pointed it to my Gitea variables and ran docker compose up -d.

      If my server ever crashes, I can just copy it over and start from scratch.

  • @Hexarei@programming.dev
    link
    fedilink
    English
    191 year ago

    Others have addressed the root and trust questions, so I thought I’d mention the “mess” question:

    Even the messiest bowl of ravioli is easier to untangle than a bowl of spaghetti.

    The mounts/networks/rules and such aren’t “mess”, they are isolation. They’re commoditization. They’re abstraction - Ways to tell whatever is running in the container what it wants to hear, so that you can treat the container as a “black box” that solves the problem you want solved.

    Think of Docker containers less like pets and more like cattle, and it very quickly justifies a lot of that stuff because it makes the container disposable, even if the data it’s handling isn’t.

  • @MigratingtoLemmy@lemmy.world
    link
    fedilink
    English
    111 year ago

    Docker can be run rootless. Podman is rootless by default.

    I build certain containers from scratch. Very popular FOSS software can be trusted, but if you’re as paranoid, you should probably run the bare-minimum software in the first-place.

    It’s a mess if you’re not used to it. But yes, normal unix networking is somewhat simpler (like someone mentioned, LXC containers can be a decent idea). Well, you’ll realise that Docker is not really top-dog in terms of complexity when you start playing with the big boys like full-fledged k8s

  • Display Name
    link
    fedilink
    English
    491 year ago
    • Podman solves the root issue
    • you can inspect the stuff. You don’t have to, but it helps if you’re not paranoid with popular and widespread images
    • I have no mess

    It’s great that you do install things on bare metal, I did that in the beginning until I discovered docker and I will never go back. Docker/ podman compose is just so good

    • @redcalcium@lemmy.institute
      link
      fedilink
      English
      281 year ago

      you can inspect the stuff. You don’t have to, but it helps if you’re not paranoid with popular and widespread images

      Dive is a great tool for inspecting docker images. I wish I found it sooner.

      • Droolio
        link
        fedilink
        English
        51 year ago

        Thank you for posting this, hadn’t heard of it before.

    • @TCB13@lemmy.world
      link
      fedilink
      English
      -131 year ago

      It doesn’t really matter if there are truly open-source and open ecosystems of containerization technologies because in the end people/companies will pick the proprietary / closed option just because “it’s easier to use” or some other specific thing that will be good on the short term and very bad on the long term. This happened with CentOS vs Debian is currently unfolding with Docker vs LXC/RKT/Podman and will happen with Ubuntu vs Debian for all those who moved from CentOS to Ubuntu.

      • @ericjmorey@programming.dev
        link
        fedilink
        English
        6
        edit-2
        1 year ago

        It cuts both ways. Less commercial interest means only hobby level development (which can be high quality, but is typically slow and unpolished for users).

        So you can spend your energy on making up the gap between the ease of use of the commercially supported software and the pure volunteer projects or you can have free time for things you’re more interested in and jump ship when they squeeze too hard for cash.

      • lemmyvore
        link
        fedilink
        English
        21 year ago

        I mean, “it’s easier to use” is a pretty good quality to have. People tend to pick the most user-friendly and time-saving solution, should we really be surprised? On the contrary, I think FOSS should strive to be easier to use.

        • @TCB13@lemmy.world
          link
          fedilink
          English
          0
          edit-2
          1 year ago

          I mean, “it’s easier to use” is a pretty good quality to have. People tend to pick the most user-friendly and time-saving solution

          And they don’t consider anything else and they they get themselves into CentOS situations. Or large monopolies like what Microsoft has over Office.

          I think FOSS should strive to be easier to use.

          Yes so do I.

          • lemmyvore
            link
            fedilink
            English
            41 year ago

            And they don’t consider anything else and they they get themselves into CentOS situations. Or large monopolies like what Microsoft has over Office.

            But so what? The kind of people who do this were not going to be grand contributors to FOSS anyway. They’re just consumers, not makers, and they consume the products that make the most sense to them.

            Also, let’s not lay everything solely on consumer stupidity. Microsoft spends a crapton of money lobbying governments, administrations, universities, schools and so on around the world to maintain their monopoly. Corruption at all levels of society is a big factor.

            • @nonprofitparrot@lemmy.world
              link
              fedilink
              English
              21 year ago

              Lots of docker guides + documentation just don’t work, specifically with podman-compose. The networking options are not fully featured, I ended up having to rig up a bunch of kubernetes services just to be able to use my VPN as a network bridge for my media server stack. I got podman working eventually because I think it’s neat, but it definitely would have been twice as easy to just use docker.

    • ShimitarOP
      link
      fedilink
      English
      -51 year ago

      Need to study podman probably, stuff running as root is my main dislike.

      Probably if in only used docker images created by me I would be less concerned of losing track of what I am really deploying, but this would deflect the main advantage of easy deploy?

      Portability is a point I didn’t considered too… But rebuilding a bare metal server properly compatimentized took me a few hours only, so is that really so important?

          • Display Name
            link
            fedilink
            English
            01 year ago

            Unfortunately I do not have a source but to me it was like podman would replace docker as the container technology since red hat focuses on podman and not docker anymore and kubernetes doesn’t support docker anymore. Transitioning obviously takes ages because of companies being very slow.

            • @N0x0n@lemmy.ml
              link
              fedilink
              English
              11 year ago

              I hope you’re wrong… With RH’s recent choices in regard of FOSS… I really hope podman won’t replace docker. Specially in the self-hosted/FOSS community !

              • Display Name
                link
                fedilink
                English
                11 year ago

                What’s wrong with podman?

                It’s still many many years away. Just think about there being still fortran or assembly code

                • @N0x0n@lemmy.ml
                  link
                  fedilink
                  English
                  11 year ago

                  Probably nothing, I have never tried it… but docker compose feels so comfortable right now and relearn everything… uuhhg !

      • @null@slrpnk.net
        link
        fedilink
        English
        41 year ago

        But rebuilding a bare metal server properly compatimentized took me a few hours only, so is that really so important?

        Depends on how much you value your time.

        Compare a few hours on bare metal to a few minutes with containers. Then consider that you also spend extra time on bare metal cleaning up messes. Containers don’t make a mess in the first place.

    • @QuikxSpec@lemmy.world
      link
      fedilink
      English
      11 year ago

      Do you have a preferred resource? I’m setting up my NAS and starting to prepare for setting up containers. In the meantime it’s just static storage until I get comfortable

    • @Molecular0079@lemmy.world
      link
      fedilink
      English
      31 year ago

      Out of curiosity, what reverse proxy docker do you use that can run rootless in podman? My main issue, and feel free to correct me if I am wrong, is that most of them require root. And then its not possible to easily connect those containers into the same network as your rootless containers so then your other containers have to be root anyways. I don’t really want my other containers to be host accessible, I want them to be only accessible from within the podman network that the reverse proxy has access to.

      And then there’s issues where you have to enable lingering processes for normal users and also let it access ports < 1024, makes using docker-compose a pain, etc. I haven’t really found a good solution for rootless, but I really want to eventually move that way.

  • Aniki 🌱🌿
    link
    fedilink
    English
    20
    edit-2
    1 year ago

    1.) No one runs rooted docker in prod. Everything is run rootless.

    2.) That’s just patently not true. docker inspect is your friend. Also you can build your own containers trusting no-one. FROM Scratch https://hub.docker.com/_/scratch/

    3.) I think mess here is subjective. Docker folders makes way more sense than Snap mounts.

  • @Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    1
    edit-2
    1 year ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    DNS Domain Name Service/System
    Git Popular version control system, primarily for code
    HTTP Hypertext Transfer Protocol, the Web
    LXC Linux Containers
    NAS Network-Attached Storage
    NAT Network Address Translation
    VPN Virtual Private Network
    k8s Kubernetes container management package
    nginx Popular HTTP server

    8 acronyms in this thread; the most compressed thread commented on today has 8 acronyms.

    [Thread #423 for this sub, first seen 10th Jan 2024, 18:25] [FAQ] [Full list] [Contact] [Source code]