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

4 days ago (howtogeek.com)

I use this https://www.reddit.com/r/selfhosted/comments/13e25l9/tutoria...

My clients are a rpi 4 and an older ipad. Sometimes use an Android phone as well.Works really well.

  • > Google acts as a meet-me point and also provides the authentication mechanisms including MFA.

    On one hand, it made me chuckle a bit. On the other hand, it could be reasonable in many scenarios.

    • I run my server on a connection that's a cgnat and nat by home router. So, no option for me other than chrome remote desktop. It also does p2p.

Samsung DEX had a Linux desktop package in 2018. It was a lxd container based on Ubuntu 16.04. They developed it in collaboration with Canonical. Unfortunately they deprecated it shortly after, maybe already in 2018. The next Android update would remove it.

It worked but Android killed it mercilessly if it used too much memory or the rest of the system needed it.

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!

  • Almost.

    For one thing, Docker is not really "Linux inside Linux". It uses Linux kernel features to isolate the processes inside a container from those outside. But there is only one Linux kernel which is shared by both the container and its host (within the Linux VM, in this case).

    For another, running Linux containers in a Linux VM on Windows is one (common) way that Docker can work. But it also supports running Windows containers on Windows, and in that case, the Windows kernel is shared just like in the Linux case. So Docker is not exactly "Linux tech".

    • I thought docker only supports windows as a host if you enable wsl, in which case you're running on hyper v and Linux kernel as part of wsl2, so absolutely Linux tech on a Linux vm on Windows... Am I wrong?

      2 replies →

  • Isn’t this the case on macOS too?

    I desperately wish I could run docker properly (CLI) on the Mac rather than use docker desktop, and while we are making a dream list, can I just run Ubuntu on the Mac mini?

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)

  • You might be better served by Incus/LXD which run "Linux containers" (ie: a full distro including systemd, SSH etc) as opposed to OCI containers.

  • You could use Nix to build the package and provide a nixos module and a docker image from the same derivation. Now you only have to manage three systems instead of two. /s

I just carry around a pwnagotchi on a keychain, and use my iPad to access it to do Linux development work, including run a full raspian desktop, dev tools, etc.

  • I’m a dummy. Can you explain your setup? How does the Pi fit on keychain?

    I searched for the term and it seems to be a DIY kit to do reinforcement learning to try to crack WPA keys?

Does anybody have a good writeup/tutorial on doing similar things with Wayland? From my limited knowledge that might be with RDP instead, but there hasn't been anything more distilled as far as I know?

I've also done xpra in docker before; that's always felt as hacky as it sounds though.

  • I don't use it much, but I've glued together sway+wayvnc+novnc in a container and it worked fine (exposing both raw VNC and the webified novnc interface).

I run full-headed Puppeteer sessions in Docker, with VNC for debugging and observation. I keep the instances as light as I can, but I suspect I'm most of the way there toward a "full" desktop experience. Probably just need to add a more full-featured window manager (currently I use fluxbox)

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 &

  • This sounds interesting. But I don’t fully follow?

    What are your use cases? To run Linux GUI apps?

    Does mobaxterm allow you to view those GUI apps?