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.

  • krash@lemmy.ml
    link
    fedilink
    English
    arrow-up
    26
    arrow-down
    12
    ·
    11 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
      38
      ·
      11 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.

      • hperrin@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        11 months ago

        This exactly. Because some poor shmuck might spend two hours trying to get Nextcloud to work with it.

      • Limitless_screaming@kbin.social
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        11 months ago

        Snap sucks, but not for the reason OP stated. There’s a decillion reasons for why Snaps suck, why make up a reason that applies to other formats that are actually good?

    • hperrin@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      3
      ·
      11 months ago

      Ok then don’t publish an application that clearly needs access to files outside of the /home directory. Or at least be upfront about how limited it is when run as a snap.

      • Big P@feddit.uk
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        2
        ·
        11 months ago

        The Linux community loves to put the responsibility on the user to understand every facet of what they’re trying to do without explaining it