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.

    • 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.

  • @Moonrise2473@feddit.it
    link
    fedilink
    English
    241 year ago

    About the root problem, as of now new installs are trying to let the user to run everything as a limited user. And the program is ran as root inside the container so in order to escape from it the attacker would need a double zero day exploit (one for doing rce in the container, one to escape the container)

    The alternative to “don’t really know what’s in the image” usually is: “just download this Easy minified and incomprehensible trustmeimtotallynotavirus.sh script and run it as root”. Requires much more trust than a container that you can delete with no traces in literally seconds

    If the program that you want to run requires python modules or node modules then it will make much more mess on the system than a container.

    Downgrading to a previous version (or a beta preview) of the app you’re running due to bugs it’s trivial, you just change a tag and launch it again. Doing this on bare metal requires to be a terminal guru

    Finally, migrating to a new fresh server is just docker compose down, then rsync to new server, and then docker compose up -d. And not praying to ten different gods because after three years you forgot how did you install the app in bare metal like that.

    Docker is perfect for common people like us self hosting at home, the professionals at work use kubernetes

  • @beta_tester@lemmy.ml
    link
    fedilink
    English
    241 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

    • @Molecular0079@lemmy.world
      link
      fedilink
      English
      21 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.

      • @beta_tester@lemmy.ml
        link
        fedilink
        English
        2
        edit-2
        1 year ago

        Tbo, I’ve got a pi that runs only the reverse proxy and it works and I don’t touch it until it breaks. It’s still docker. nginx proxy manager

    • @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

    • ShimitarOP
      link
      fedilink
      English
      -31 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?

      • @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.

          • @beta_tester@lemmy.ml
            link
            fedilink
            English
            11 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 !

              • @beta_tester@lemmy.ml
                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 !

    • @TCB13@lemmy.world
      link
      fedilink
      English
      -71 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.

            • @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.

  • @ssdfsdf3488sd@lemmy.world
    link
    fedilink
    English
    121 year ago

    Because if you use relative bind mounts you can move a whole docker compose set of contaibera to a new host with docker compose stop then rsync it over then docker compose up -d.

    Portability and backup are dead simple.

  • @MartianSands@sh.itjust.works
    link
    fedilink
    English
    121 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.

  • @MigratingtoLemmy@lemmy.world
    link
    fedilink
    English
    81 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

  • BoofStroke
    link
    fedilink
    English
    31 year ago

    I concur with most of your points. Docker is a nice thing for some use cases, but if I can easily use a package or set up my own configurations, then I will do that instead of use a docker container every time. My main issues with docker:

    • Containers are not updated with the rest of the host OS
    • firewall and mounting complexities which make securing it more difficult
  • Semi-Hemi-Demigod
    link
    fedilink
    31 year ago
    1. I don’t run any of my containers as root
    2. Dockerfiles aren’t hard to read so you can pretty easily figure out what they’re doing
    3. I find managing dependencies for non-containerized services to be worse than one messy docker directory I never look at

    Plus having all my services in a couple docker-compose files also means I can move them around incredibly easily.

  • @aleq@lemmy.world
    link
    fedilink
    English
    31 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

  • oranki
    cake
    link
    fedilink
    English
    31 year ago

    Portability is the key for me, because I tend to switch things around a lot. Containers generally isolate the persistent data from the runtime really well.

    Docker is not the only, or even the best way IMO to run containers. If I was providing services for customers, I would definetly build most container images daily in some automated way. Well, I do it already for quite a few.

    The mess is only a mess if you don’t really understand what you’re doing, same goes for traditional services.

  • @specseaweed@lemmy.world
    link
    fedilink
    English
    31 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.