Re:Podman, the open source Docker alternative ported to M1 (...
by nsonha on Monday September 06, 2021 @12:00AM
(#28430093)
Idk why people keep pushing for this, on a personal dev machine, root is not a problem, and then there is QEMU
[ Parent
| on HN ]
Re:Podman, the open source Docker alternative ported to M1 (...
by denkmoon on Monday September 06, 2021 @12:03AM
(#28430107)
I think you'd be surprised how often the route from dev to prod is "copy it from my machine into the cloud".
Good practices start at home.
Re:Podman, the open source Docker alternative ported to M1 (...
by eru on Monday September 06, 2021 @05:38AM
(#28431980)
Well, it's also a good practice the other way round:
If you can make your dev setup model the production setup, that's one less thing to worry about.
Re:Podman, the open source Docker alternative ported to M1 (...
by goodpoint on Monday September 06, 2021 @07:51AM
(#28432770)
That's what VMs are for.
Re:Podman, the open source Docker alternative ported to M1 (...
by eru on Tuesday September 07, 2021 @05:31AM
(#28442742)
VMs are one tool for that. But they are neither necessary nor sufficient.
Re:Podman, the open source Docker alternative ported to M1 (...
by nsonha on Monday September 06, 2021 @05:43AM
(#28432009)
it's docker that requires root, you don't use root yourself
Re:Podman, the open source Docker alternative ported to M1 (...
by denkmoon on Monday September 06, 2021 @10:03PM
(#28440054)
It's perfectly possible to use podman rootless. Presumably docker too, but I only have experience with podman. That is, the podman process does not have root privileges.
Maybe excessive, maybe a good prophylactic for potentially damaging NPM packages (for example) to not get root on my CI infrastructure.
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.
Re:Podman, the open source Docker alternative ported to M1 (...
by simnalamburt on Monday September 06, 2021 @05:23AM
(#28431893)
The main motive for me to make podman-apple-silicon was due do Docker Desktop's pricing model change.