Can Docker emulate a Podman command?

System is 6.2.16-2-MANJARO x86_64.

While endeavoring to create a Gnucash Container, I came across this Podman command.

podman run -d --rm \
	-e DISPLAY=unix${DISPLAY} \
	-e GNC_DATA_HOME=/root/.local/share/gnucash \
	-e GNC_CONFIG_HOME=/root/.config/gnucash \
	-v gnucash-share:/root/.local/share/gnucash/ \
	-v gnucash-config:/root/.config/gnucash/ \
	-v $HOME/Documents/gnucash/:/root/gnucash/ \
	-v /tmp/.X11-unix:/tmp/.X11-unix \
	-v /usr/share/fonts/:/usr/share/fonts:ro \
	docker.io/akiraheid/gnucash:latest

NB - Yes, Manjaro has a Gnucash download, but I am interested in how to use containers in my favorite distro and the above command works! Gnucash runs in its own window. It is cumbersome however to paste this into the command line prompt each time that I wish to use it. Further, my attempts to use Podman Desktop to run Gnucash failed. I could not get the result that I get above.

My question is - could I adapt this to fire up a docker container? Any ideas or suggestions on how to do this? I like docker. I would like to use it more often.

Then why not put it in a shell script? :slight_smile:

By the way, you’re not supposed to be running any user software as root. Do your daily work as an unprivileged user instead.

I don’t know what that is. If this is your kernel version: that kernel is EOL and dropped from the repos: you should switch to another (supported) one.

Install podman instead of docker and use that:
https://wiki.archlinux.org/title/podman

else if docker is already installed: did you try simply replacing podman with docker in that command? The switches etc. are mostly the same…

1 Like

Yes - I need to study this.

That is what concerned me about this command. It seems to be wanting root permissions. I lack the expertise to fully understand privileged and unprivileged users. There are a lot of posts, howto pages about this - but hmmm - getting a grasp of it can be difficult.

Well, the container itself will probably require running with root privileges — I don’t really know, because different virtualization solutions have different requirements — but something like gnucash should always be run with user privileges only. There’s probably a parameter to the command for doing exactly that. :thinking:

I tested the command with docker and it works. Just remember not to run docker with sudo.

Check if your user is a member of docker group:

groups | grep docker

If the output is empty, add your user to docker group and reboot:

sudo gpasswd -a $USER docker
1 Like