this post was submitted on 05 Jan 2024
12 points (100.0% liked)

Selfhosted

39980 readers
735 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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.

all 19 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 10 months ago (2 children)

I also like to run my container platform as a containerized application in another container platform.

[–] [email protected] 3 points 10 months ago (1 children)

Lol. Yeah that was my reaction to the headline as well. "You did what ?"

[–] [email protected] 4 points 10 months ago* (last edited 10 months ago) (2 children)

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.

[–] [email protected] 1 points 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.)

[–] [email protected] 1 points 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.

[–] [email protected] 1 points 10 months ago

Double-NAT anyone? 3 times the fun, 2 times the work

[–] [email protected] 3 points 10 months ago* (last edited 10 months ago) (1 children)

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

[–] [email protected] 2 points 10 months ago

A flatpak of the snap, running in a docker container inside a vm for maximum security.

[–] [email protected] 2 points 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.

[–] [email protected] 1 points 10 months ago (1 children)
[–] [email protected] 1 points 10 months ago

That’s a start, but I need access to both /home and /data.

[–] [email protected] 0 points 10 months ago* (last edited 10 months ago) (1 children)

Yah, it's been trash from the start. I tried it 2 years ago and the unpredictable weird shit it did was useless to try to troubleshoot. It was worse than trying to run Docker on Windows, if that can be believed.

Debian with the Docker convenience script is the way to run Docker.

[–] [email protected] 0 points 10 months ago* (last edited 10 months ago) (1 children)

Docker has an apt repo. You can add it to your Debian/Ubuntu and install and update packages normally. No need to use a script install.

https://docs.docker.com/engine/install/ubuntu/

[–] [email protected] 0 points 10 months ago (1 children)

Is there a difference between the apt and the install script version?

[–] [email protected] -1 points 10 months ago

all depends on what your aptitude is configured to look for.

[–] [email protected] -3 points 10 months ago (2 children)

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.

[–] [email protected] 2 points 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.