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.

    • catloaf@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      We should each not have to configure log rotation for every individual service. That would require identify what and how it logs data in the first place, then implementing a logrotate config. Services should include a reasonable default in logrotate.d as part of their install package.

      • sugar_in_your_tea@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        Docker services should let docker handle it, and the user could then manage it through Docker or forward to some other logging service (syslog, systemd, etc). Processes in containers shouldn’t touch rotation or anything, just log levels and maybe which types of logs go to stdout vs stderr.

    • non_burglar@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      I don’t disagree that logrotate is a sensible answer here, but making that the responsibility of the user is silly.

      • Shimitar@downonthestreet.eu
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        Are you crazy? I understand that we are used to dumbed down stuff, but come on…

        Rotating logs is in the ABC of any sysadmin, even before backups.

        First, secure your ssh logins, then secure your logs, then your fail2ban then your backups…

        To me, that’s in the basic stuff you must always ensure.

        • Appoxo@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          0
          ·
          3 months ago

          Logration is the abc of the developer.
          Why should I need 3rd party tools to fix the work of the developer??

          • Shimitar@downonthestreet.eu
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 months ago

            Why is that? Really? The Dev should replace a system function? And implement over and over again the same errors when logrotate exist?

            • acockworkorange@mander.xyz
              link
              fedilink
              English
              arrow-up
              0
              ·
              3 months ago

              Yes, that’s exactly what we’re arguing here. The developer also should replace autotools/cmake, git, … Don’t be daft! Packaging sane defaults for logrotate is now replacing a system function?

              • sugar_in_your_tea@sh.itjust.works
                link
                fedilink
                English
                arrow-up
                1
                ·
                3 months ago

                Docker is supposed to run a single process Logrotate is a separate process. So unless the application handles rotating logs, the container shouldn’t handle it.

    • Scrubbles@poptalk.scrubbles.tech
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      Persistent storage should never be used for logging in docker. Nextcloud is one of the worst offenders of breaking docker conventions I’ve found, this is just one of the many ways they prove they don’t understand docker.

      Logs should simply be logged to stdout, which will be read by docker or by a logging framework. There should never be “log files” for a container, as it should be immutable, with persistent volumes only being used for configuration or application state.

      • exu@feditown.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        The AIO container is so terrible, like, that’s not how you’re supposed to use Docker.
        It’s unclear whether OP was using that or saner community containers, might just be the AIO one.

  • zoey@lemmy.librebun.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    Reminds me of when my Jellyfin container kept growing its log because of something watchtower related. Think it ended up at 100GB before I noticed. Not even debug, just failed updates I think. It’s been a couple of months.

    • ChaoticNeutralCzech@feddit.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      25 days ago

      Is there a tool to automatically check partitions for excessive log files, caches or other junk? The root partition of a Linux box I have is 60 GiB and almost full, and XFCE will fail to start when there’s no space. I would use WinDirStat on Windows but the Linux alternatives can’t do the job properly because they scan by file tree and some subdirectories of / are on other partitions because of symlinks… I guess I could boot a live USB and mount my ext4 root partition but not the NTFS storage one but I’d rather avoid that.