this post was submitted on 02 Nov 2023
54 points (95.0% liked)

Selfhosted

40006 readers
622 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
top 47 comments
sorted by: hot top controversial new old
[–] lemmyvore@feddit.nl 40 points 1 year ago

Docker. It's been around longer, it's more polished, easier to learn, simpler to use, supported everywhere and by everything, easy to find solutions when you search for help, doesn't depend on systemd, compatible with every container image out there, and you can do things with it even if it's not the "correct" way to do it while podman will tell you "no, you can't do that".

[–] azdle@news.idlestate.org 28 points 1 year ago (2 children)

If your distro offers it, rootless podman + podman system service is the best setup, IMO. That will give you a docker command that is 1-to-1 compatible with docker and lets you use tools like docker-compose that expect a docker service socket. Then you can just follow tutorials that only explain things for docker.

[–] ssdfsdf3488sd@lemmy.world 1 points 1 year ago

will it let you do rootless nfs mounts into the container? That's the showstopper for me, as that is by far the best way to just make this all work within the context of my file storage.

[–] Yoddel_Hickory@lemmy.ca 20 points 1 year ago (8 children)

Podman, rootless containers work well, and there is no central process running everything. I like that starting containers on boot is integrated with systemd.

[–] Discover5164@lemm.ee 0 points 1 year ago (2 children)

i would like to try.. but as far as i know, there is no "docker compose up -d"

[–] MartianSands@sh.itjust.works 10 points 1 year ago

Podman supports docker compose just fine. You have to run it as a service, so that it can expose a socket like docker does, but it supports doing exactly that

[–] Yoddel_Hickory@lemmy.ca 2 points 1 year ago (1 children)
[–] Discover5164@lemm.ee 1 points 1 year ago (1 children)
[–] worldofgeese@lemmy.world 2 points 1 year ago* (last edited 1 year ago) (1 children)

Check my comment history for an example of a simple bind mount compose.yaml I use for developing a small Python project. It's exactly the same as Docker Compose (since Podman Compose follows the Compose spec) but if you're just getting started, it might be a good skeleton to build on.

[–] Discover5164@lemm.ee 2 points 1 year ago

i have all my stacks on docker compose. if it follows the same specks, i would only need to convert volumes and networks

load more comments (7 replies)
[–] thelastknowngod@lemm.ee 16 points 1 year ago (1 children)

Don't overthink this. Just start using something.

[–] deadcatbounce@reddthat.com 4 points 1 year ago

This is the best advice. Bloody hard for me to do, however. Not sure why.

[–] visnae@lemmy.world 7 points 1 year ago

Podman, dockerd is a single point of failure

[–] ithilelda@lemmy.world 6 points 1 year ago

definitely docker. it just has so much more documentation and community involvement.

On what host system?

[–] ikidd@lemmy.world 4 points 1 year ago

If you're running it for your own network, just use Docker. The tooling is way, way better for docker, especially for a beginner.

[–] theterrasque@infosec.pub 3 points 1 year ago
[–] nonprofitparrot@lemmy.world 3 points 1 year ago

I do a lot of docker/k8s at work, and I use podman at home. Podman is very cool in theory but still rough around the edges. I recommend docker if you just want to get started, Podman is a little extra work.

[–] Max_P@lemmy.max-p.me 3 points 1 year ago (1 children)

I'd go Docker for the maturity. Podman is nice but I've definitely had some issues, and Buildah lacks any sort of caching and does unnecessary intermediate copies of the layers when pushing to a repository that really slows things down on larger apps/images.

[–] iluminae@lemmy.world 3 points 1 year ago* (last edited 1 year ago) (1 children)

Buildah lacks any sort of caching

... what? assuming you are using a Containerfile.... what? It's.... the same as docker on layer caching. The --cache-to and --cache-from flags are particularly sweet.

[–] Max_P@lemmy.max-p.me 0 points 1 year ago (1 children)

Maybe they changed it since last year, but it wouldn't cache layers for me. Everytime I'd rebuild the app, it would re-run all the actions from the Containerfile. So a whole npm install each build even though I only changed a source file. Building the exact same file with Docker cached every layer as expected, so a config change would only change the last layer and be basically instant vs 5 minutes.

The other issue with pushing to a registry was that it made a whole temporary tar of the image, then gzip it to disk again before starting to upload it. It blew up the disk space I had allocated to my VM really fast, and made uploading those images take minutes instead of seconds. Docker again seemingly does it all in a streaming fashion as it uploads, making it much faster.

This could have changed though, it's evolving fast. Just didn't fit my use case then. But because of those experiences, I'd say it's probably a safer bet to learn Docker first since documentation is abundant, and there's no little "oh I'm using Podman and have to use a slightly different syntax" gotchas to run into to make it hard for you.

[–] worldofgeese@lemmy.world 1 points 1 year ago* (last edited 11 months ago)

This sounds like something on your end as I get cached builds every time, rootlessly even. Podman also supports cache mounts.

[–] iluminae@lemmy.world 2 points 1 year ago

A year or two ago (whenever docker changed the business license of docker for Mac) I changed to podman and aliased docker=podman. It behaves the same, you would just about never know rootful podman vs docker.

Rootless podman is super cool and a much better security ideal - but comparing more apples to apples would be podman running as root vs docker.

[–] possiblylinux127@lemmy.zip 2 points 1 year ago

Docker if you are unsure how to begin. You can use docker compose with configs you find on the internet.

If your interested in podman I would start by using it though distrobox. Distrobox is a tool that allows other Linux environments on your host system and is really good for development

[–] SheeEttin@lemmy.world 1 points 1 year ago (1 children)

Whichever one is better supported by the containers you want to run.

[–] krolden@lemmy.ml 4 points 1 year ago (1 children)

They both support the same containers

[–] lemmyvore@feddit.nl -3 points 1 year ago (1 children)

Except in real life you'll run into images that podman refuses to work with all the time.

[–] krolden@lemmy.ml 2 points 1 year ago (1 children)

Example? Ive definitely had compose projects that I had a hard time running with podman but all the individual containers seem to work just fine.

[–] lemmyvore@feddit.nl 3 points 1 year ago (1 children)

How do you make podman run an image that runs as an uid/gid that don't exist on the host and needs to access host devices/volumes owned by uid/gid that don't exist in the container?

[–] vegetaaaaaaa@lemmy.world 8 points 1 year ago* (last edited 1 year ago) (1 children)

You use podman unshare to chown the directories to the appropriate UID/GID in the container's user namespace.

[–] nickwitha_k@lemmy.sdf.org 4 points 1 year ago

This right here. Just found out about this last week after a long debug.