News for hackers. Stuff that matters.
Re:Podman, the open source Docker alternative ported to M1 (... by stavros on Monday September 06, 2021 @04:23AM (#28431603)
It certainly is a problem. We want to run local development stacks with Docker, but, since it runs as root, it leaves files into your home directory (database and other files mounted from the guest) that are owned by root, so you can never delete them.

It's really bad UX.

Re:Podman, the open source Docker alternative ported to M1 (... by hda111 on Monday September 06, 2021 @05:48AM (#28432050)
Rootless Podman does this as well but with the subuid owned files. For instance you run postfix in a container and it has files owned by postfix. You can’t change the files outside of the container. You can make yourself root in the namespace and delete with podman unshare however. But it isn’t optimal from UX perspective either.
Re:Podman, the open source Docker alternative ported to M1 (... by nickjj on Monday September 06, 2021 @09:40AM (#28433519)
If you create a user inside of your Dockerfile and switch to that your files will be owned by whoever is assigned to uid:gid 1000:1000 on your dev box if you use a volume mount. This solves the problem in nearly every case because your primary dev box user is almost always going to be 1000:1000. It'll work on native Linux, Windows (WSL) and macOS using Docker Desktop or not.

Here's a bunch of complete web app examples of it working: https://github.com/nickjj?tab=repositories&q=docker-*-exampl...

Re:Podman, the open source Docker alternative ported to M1 (... by stavros on Monday September 06, 2021 @02:17PM (#28436437)
Oh, good call, I wasn't doing this because 1000 is not always the user uid, but it's almost always, and at worst you'll need root to delete the files, thanks!
Re:Podman, the open source Docker alternative ported to M1 (... by wiredfool on Monday September 06, 2021 @05:57AM (#28432094)
Home directory, /etc, or /root/.ssh/authorized_keys, depending on what arguments you pass to -v.