I spent two hours today trying to figure out why Nextcloud couldn’t read my data directory. Docker wasn’t mounting my data directory. Moved everything into my data directory. Docker couldn’t even see the configuration file.

Turns out the Docker Snap package only has access to files under the /home directory.

Moral of the story: never trust a Snap package.

      • redcalcium@lemmy.institute
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        10 months ago

        Why does Docker has a snap version in the first place anyway? Did Canonical pester them to do it?

        Edit:

        Nope, it’s just Canonical went ahead and publish it there by themselves.

        This snap is built by Canonical based on source code published by Docker, Inc. It is not endorsed or published by Docker, Inc.

        • thesmokingman@programming.dev
          link
          fedilink
          English
          arrow-up
          2
          ·
          10 months ago

          It’s also offered as part of the installation process at least for Ubuntu server. If you don’t know better it bites you real quick.

        • GenderNeutralBro@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          1
          ·
          10 months ago

          It’s insane how many things they push as Snaps when they are entirely incompatible with the Snap model.

          I think everyone first learns what Snaps are by googling “why doesn’t ____ work on Ubuntu?” For me, it was Filebot. Spent an hour or two trying to figure out how the hell to get it to actually, you know, access my files. (This was a few years ago, so maybe things are better now. Not sure. I don’t live that Snap life anymore, and I’m not going back.)

  • Samsy@lemmy.ml
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    10 months ago

    TIL, docker has a snap package, and can’t stop laughing. What’s next? A flatpak or AppImage?

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    8
    ·
    10 months ago

    Snap is one of those things that shouldn’t exist. There’s distrobox (podman) or flatpak both of which are more mature and flexible.

  • krash@lemmy.ml
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    5
    ·
    10 months ago

    But this is by design, snap containers aren’t allowed to read data outside of their confinements. Same goes for flatpak and OCI-containers.

    I don’t use snap myself, but it does have its uses. Bashing it just because it’s popular to hate on snap won’t yield a healthy discussion on how it could be improved.

    • thesmokingman@programming.dev
      link
      fedilink
      English
      arrow-up
      14
      ·
      10 months ago

      The issue here is that Canonical pushed the snap install without warning about its reduced functionality. I don’t think highlighting a wildly different experience between a snap install and the Docker experience people are used to from the standard package install is “bashing it just because it’s popular to hate on snap.” For example, if you take a fresh Ubuntu server 22 install and use the snap package, not realizing that snaps have serious limitations which are not explicitly called out when the snap is offered in the installation process, you’re going to be confused unless you already have that knowledge. It also very helpfully masks everything so debugging is incredibly difficult if you are not already aware of the snap limitations.

    • Aniki 🌱🌿@lemm.ee
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      10 months ago

      Snap can be improved with this one simple step

      sudo apt-get purge snapd -y

      There’s no improving snap. it sucks – full stop. just the mount clutter alone makes it garbage.

      The solution exists and its called flatpak and it works MUCH BETTER than canonical-only scholck.