I set it to debug at somepoint and forgot maybe? Idk, but why the heck does the default config of the official Docker is to keep all logs, forever, in a single file woth no rotation?

Feels like 101 of log files. Anyway, this explains why my storage recipt grew slowly but unexpectedly.

  • Neo
    link
    fedilink
    English
    163 months ago

    Imho it’s because docker does away with (abstracts?) many years of sane system administration principles (like managing logfile rotations) that you are used to when you deploy bare metal on a Debian box. It’s a brave new world.

    • Scrubbles
      link
      fedilink
      English
      503 months ago

      It’s because with docker you don’t need to do log files. Logging should be to stdout, and you let the host, orchestration framework, or whoever is running the container so logs however they want to. The container should not be writing log files in the first place, containers should be immutable except for core application logic.

    • poVoq
      link
      fedilink
      English
      5
      edit-2
      3 months ago

      Or you can use Podman, which integrates nicely with Systemd and also utilizes all the regular system means to deal with log files and so on.

      • Neo
        link
        fedilink
        English
        23 months ago

        Good suggestion, although I do feel it always comes back to this “many ways to do kind of the same thing” that surrounds the Linux ecosystem. Docker, podman, … some claim it’s better, I hear others say it’s not 100% compatible all the time. My point being more fragmentation.

        • @[email protected]
          link
          fedilink
          English
          23 months ago

          100 ways to configure a static ip.
          Why does it need that? At least one per distro controlled by the distro-maintainers.

          • @[email protected]
            link
            fedilink
            English
            33 months ago

            There’s basically three types of networking config:

            • direct with the kernel - don’t do this
            • some distro-specific abstraction - e.g. /etc/network/interfaces for Debian
            • networking manager - wicked, network manager, etc

            I do the last one because it’s distro-agnostic. I use Network Manager and it works fine.

            • @[email protected]
              link
              fedilink
              English
              13 months ago

              I notice that you replied to me once again in connection to me mentioning static IP and linux.
              Can I summon you this way? ^^

              • @[email protected]
                link
                fedilink
                English
                13 months ago

                Apparently. I was wondering if you were the same person.

                I’m just a happy Linux user trying to help when other people run into problems.

      • @[email protected]
        link
        fedilink
        English
        13 months ago

        Does podman do the Docker networking thing where I can link containers together without exposing ports to the rest of the system? I like my docker compose setup where I only expose caddy (TLS trunking) and Jellyfin (because my TV fails connecting w/ TLS).

        • poVoq
          link
          fedilink
          English
          13 months ago

          I think it also has that, but normally it uses an even easier concept of pods that basically wrap multiple containers into a meta container with it’s own internal networking and name space, and that does exactly what you want.

          • @[email protected]
            link
            fedilink
            English
            13 months ago

            Nice! I’ve been having permissions conflicts between Samba (installed system-wide) and Jellyfin (docker), so it’s probably as good a time as any to try out podman since I need to mess with things anyway.

    • @[email protected]
      link
      fedilink
      English
      4
      edit-2
      3 months ago

      I disagree with this, container runtimes are a software like all others where logging needs to be configured. You can do so in the config of the container runtime environment.

      Containers actually make this significantly easier because you only need to configure it once and it will be applied to all containers.

      • @[email protected]
        link
        fedilink
        English
        43 months ago

        Or you can forward to your system logger, like syslog or systemd.

        But then projects like NextCloud do it all wrong by using a file. Just log to stdout and I’ll manage the rest.

      • Neo
        link
        fedilink
        English
        33 months ago

        You are right and as others have pointed out correctly it’s Nextcloud not handling logging correctly in a containerized environment. I was ranting more about my dislike of containers in general, even though I use the technology (correctly) myself. It’s because I am already old on the scale of technology timelines.