Live data from Hacker News

I run a full Linux desktop in Docker just because I can

howtogeek.com

1–10 of 124 posts

Re: I run a full Linux desktop in Docker just because I can

#2
I develop my apps in the most possible native way I can: deb packages, apt repo, systemd, journald etc. however I would like to also be able to run it in docker/vm. Is there a good systemd-in-docker solution for this to basically not run anything differently and not have to maintain two sets of systems?

Re: I run a full Linux desktop in Docker just because I can

#4
post #2

I develop my apps in the most possible native way I can: deb packages, apt repo, systemd, journald etc. however I would like to also be able to run it in docker/vm. Is there a good systemd-in-docker solution for this to basically not run anything differently and not have to maintain two sets of systems?

Have you looked at systemd-nspawn[0]? Its not docker so it wouldn't be useful for writing Dockerfiles but it is light containers that work beautifully with systemd.

[0] https://wiki.archlinux.org/title/Systemd-nspawn

Re: I run a full Linux desktop in Docker just because I can

#5
post #2

I develop my apps in the most possible native way I can: deb packages, apt repo, systemd, journald etc. however I would like to also be able to run it in docker/vm. Is there a good systemd-in-docker solution for this to basically not run anything differently and not have to maintain two sets of systems?

Have you looked at systemd-nspawn[0]? Its not docker so it wouldn't be useful for writing Dockerfiles but it is light containers that work beautifully with systemd. [0] https://wiki.archlinux.org/title/Systemd-nspawn

Thanks, this looks awesome! Will play around on my CI/CD first to see if it's any good for the build-server to add trixie builds. Might use in prod deploys later.

Re: I run a full Linux desktop in Docker just because I can

#6
post #2

I develop my apps in the most possible native way I can: deb packages, apt repo, systemd, journald etc. however I would like to also be able to run it in docker/vm. Is there a good systemd-in-docker solution for this to basically not run anything differently and not have to maintain two sets of systems?

Containers with systemd as an init process are considered first-class citizen by the Podman ecosystem (the base images are named accordingly: e.g, ubi10-init vs ubi10)

Re: I run a full Linux desktop in Docker just because I can

#8
On Windows, doesn't this technically mean OP is running Linux inside a Linux VM inside Windows? From what I understand Docker is Linux tech and to use it anywhere else a (small) Linux VM is required. If true, I would just dispense with the extra layer and just run a Linux VM. Not to discourage experimentation though!

Re: I run a full Linux desktop in Docker just because I can

#9
I run Arch under WSL2 and then in ~/.bashrc:

WINDOWS_IP=$(ip route | awk '/^default/ {print $3}')

DISPLAY="$WINDOWS_IP:0"

Now I can use the mighty mobaxterm from https://www.mobatek.net to just run whatever and pipe it back to Windows.

One caveat is that the $PATH gets polluted with space characters by 'Doze, so I have to do something like this for QGIS:

PATH=/usr/local/sbin:/usr/local/bin:/usr/bin qgis -n &

Post reply on HN