6 ms·
I run a full Linux desktop in Docker just because I can
- mirkwoodkramer 1y agoWe did this as way to break the 'are you human test captcha' a while back. Nothing nefarious, just a hacking problem we were doing back then.
- k_bx 1y agoI 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?
- seabrookmx 1y agoYou might be better served by Incus/LXD which run "Linux containers" (ie: a full distro including systemd, SSH etc) as opposed to OCI containers.
- craftkiller 1y agoHave 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 https://wiki.archlinux.org/title/Systemd-nspawn
- k_bx 1y agoThanks, 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.
- k_bx 1y agoUpdate: I looked at it. Overall it looks very promising on paper. However, the bootstrapping process is so much work that I've ended up ditching it for now. I don't want to "automate the automation" yet. Trying out podman now.
- ranger_danger 1y agoHave you tried LXC? It runs entire distros as containers, with init and everything.
- k_bx 1y agoIt looks a bit confusing. There’s LXC, LXD and Incus. I should look for Incus, right? Seems a bit less popular and supported, I also like that Podman has strong backing from Red Hat and potentially seamless macOS integration. Otherwise if Podman will fail I’ll take a look at Incus.
- k_bx 1y agoTried Podman. It looked quite promising, but failed me: https://github.com/containers/podman/discussions/26899 https://github.com/containers/podman/discussions/26899 Trying Incus now
- throwaway74354 1y agoContainers 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)
- k_bx 1y agoMy current production systems are running Ubuntu 22.04, and there is no official images with systemd for them in Podman. So it does feel like second class citizen. On another hand, if ubi’s work fine — that means there should be no technical limitation to keep Ubuntu working. I’ll keep playing with Podman for now, but will switch to Incus if that will fail
- nothrabannosir 1y agoYou 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
- cpuguy83 1y agohttps://github.com/Azure/dalec https://github.com/Azure/dalec Build system packages and containers from those packages for a given target distro. Behind the scenes it uses buildkit, so it's no extra stuff you need, just docker (or any buildkit daemon).
- deleted 1y ago[deleted]
- hauxir 1y agoI run my whole development environment in a docker container. Not desktop mind you but my neovim/tmux/fish setup. This allows me to sandbox my whole environment so i can run it exactly the same no matter the machine, including all packages and editor plugins. If anyone wants to check it out it's at https://github.com/hauxir/dotfiles https://github.com/hauxir/dotfiles the devenv.sh file describes my entire environment.
- mertleee 1y agoWhat's the best way to forward the x-server over ssh?
- jasonjayr 1y agossh -YC user@$host Has worked since .... forever. Interestingly, it works with WSL2 on windows, too!
- treve 1y agoOn 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!
- teraflop 1y agoAlmost. 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".
- xeonmc 1y agoCan he install Wine in the Docker container to run Windows games from it?
- ThunderSizzle 1y agoSteam and it's remote play options seem more enticing to set up for me.
- NikolaNovak 1y agoI 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?
- gregoryl 1y agoDocker supports either hyper-v, or wsl2 as a host for the Linux kernel - they generally push people towards wsl2. I vaguely recall wsl2 uses a subset of hyper-v the name of which escapes me atm.
- smitty1e 1y agoI 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 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 &
- uxcolumbo 1y agoThis 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?
- smitty1e 1y agoYes, Moba provides the X11 functionality to allow me to run QGIS under Arch and see the maps.
- uxcolumbo 1y agoJust had a look at QGIS. It appears to be cross platform. Why not run it directly on Windows? Are there benefits running it under Arch and then 'stream' it to Windows? Assuming it's faster running QGIS in Linux? Or is it because all your other dev stuff is in Linux? (Sorry of these questions are basic - just curious).
- okanat 1y agoThis is a much less efficient way of running Linux GUI apps over WSL since it will use software rendering. WSL2 provides a GPU accelerated Wayland server. If your Mesa build (ver > 22) has d3d12 drivers you can use Windows DirectX as your OpenGL driver. Combined with the WSLg Wayland server you get near native desktop performance out of GUI apps.
- smitty1e 1y agoOne other nit was that WSL2 does not expose the USB ports to the Arch guest very easily. So I had to install USBIP on the Windows11 host, and bring in a tool chain and compile a Linxux 6.x kernel in order to add external storage for my QGIS data.
- deleted 1y ago[deleted]
- bdcravens 1y agoI 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)
- hippospark 1y agoRelated posts: - [How to Run GUI Applications Directly in Containers](https://github.com/hemashushu/docker-archlinux-gui https://github.com/hemashushu/docker-archlinux-gui) - [GUI Application Development Environment in a Container](https://github.com/hemashushu/docker-archlinux-gui-devel https://github.com/hemashushu/docker-archlinux-gui-devel)
- happyman 1y agoI use this https://www.reddit.com/r/selfhosted/comments/13e25l9/tutorial_cheapo_vdi_based_on_chrome_remote_desktop/ 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.
- nine_k 1y ago> 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.
- happyman 1y agoI 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.
- wutwutwat 1y agoIf you create an outbound tunnel, your options are whatever you want. nat and cgnat only affect inbound routing. check into tailscale or cloudflare tunnels/argo
- mook 1y agoDoes 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.
- yjftsjthsd-h 1y agoI 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).
- Cieric 1y agoThat sounds useful, do you have the Dockerfile for it pushed anywhere?
- yjftsjthsd-h 1y agoHere ya go:) https://gitlab.com/yjftsjthsd-g/docker_sway-vnc https://gitlab.com/yjftsjthsd-g/docker_sway-vnc
- pmontra 1y agoSamsung 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.
- asabla 1y agoI still remember how much I liked the idea. Really tried to use it, but the experience with both browsers and vscode was....not that great. Kinda hope they revisit this idea in a near future again
- noisem4ker 1y agoGoogle is implementing a full Linux VM in Android 16. This is probably how we'll get something similar. https://www.androidauthority.com/android-16-linux-terminal-doom-3521804/ https://www.androidauthority.com/android-16-linux-terminal-d...
- heresie-dabord 1y agoSome current Android devices that have USB-C 3.1+ and support dp-alt-mode (USB-C to HDMI) will detect when an external display is connected and provide a full extended desktop. [0] You can connect mouse, keyboard, and display to the Android device through an unpowered USB-C hub that offers the respective ports. Battery life depends on the make/model of Android device. I have a Motorola phone and the experience is very nice. [0] _ https://uperfect.com/blogs/wikimonitor/list-of-smartphones-with-displayport-alt-mode https://uperfect.com/blogs/wikimonitor/list-of-smartphones-w...
- ThePowerOfFuet 1y ago>Although DisplayPort functionality was disabled at a hardware level on Google Pixel 7 and previous models, Mishaal Rahman discovered that it is only locked at a software level on the Google Pixel 8. It is possible to enable display output on a rooted Pixel 8 with the following shell command with adb. It works perfectly with GrapheneOS as of Pixel 8 and newer.
- MomsAVoxell 1y agoI 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.
- uxcolumbo 1y agoI’m a dummy. Can you explain your setup? How does the Pi fit on a keychain? I searched for the term and it seems to be a DIY kit to do reinforcement learning to try to crack WPA keys?
- BoredPositron 1y agoIt's running on a pi as with every other general computing device you can also run other stuff.
- uxcolumbo 1y agoI get that. I was just wondering about the comment that it can be carried around on a keychain. Looking at the pictures, some have a little screen attached and maybe a battery, so thought it might be a bit too big for a keychain.
- MomsAVoxell 1y agoOkay, your keychain and my keychain might have different orders of magnitude, but yeah - I run the pwnagotchi as a standalone Linux machine (because that's what it is), and I use the paper display for my own purposes these days, just to view a calendar and subjects of last 3 messages to a particular mailbox .. when I want to do some dev, I ssh -Y in, and its just like a moderately performing Linux box .. https://www.thingiverse.com/thing:6981256 https://www.thingiverse.com/thing:6981256 The pwnagotchi stuff is fun, but its also easily turned off, which means its not always just pwnagotchi'ing .. more of a battery powered raspian box I can also clip inside the moped glovebox .. When I get to my desktop, I can also just use standard KVM dongles and use it that way .. its not fast, but for a lot of things, its quite adequate ..
- jmakov 1y agoFor me this opens the question of are there any good remote desktop solutions for multiuser systems around. Rustdesk is single user, TurboVNC works, but there can be lag.
- Infiltrator 1y agoXrdp works well for this purpose
- jpatten 1y agoI use Thinlinc. It's free for under 5 concurrent users
- raesene9 1y agoA fun idea might be to combine something like this with Tailscale & their Mullvad add-on, so you get ephemeral browsing environments with VPN connectivity, could make it easy to test from various countries simultaneously on a single host.
- nijave 1y agoGluetun can handle the VPN connection part for a bunch of providers
- windexh8er 1y agoGluetun is the bomb. I run it in front of all of the *arrs as well as LSIO's webtop for quick access to a VPN (Mullvad). The nice thing is the operational containers don't have network access to the Internet if the Glutun container is down, so it's a nice failsafe mechanism to guarantee the VPN path.
- pkulak 1y agoSheesh. Just use LXC.
- rahen 1y agoThis is the first thing that came to my mind. Why pick an OCI container instead of an LXC container since it's a stateful workload? Going OCI here only makes sense for temporary, disposable sessions.
- swiftcoder 1y agoCan you not use the X11 server packaged with WSL as your display driver, and avoid piping this all into the web browser? Seems very inefficient to have to render everything through the browser
- Cu3PO42 1y agoWSL doesn't have an X Server, it has a Wayland compositor. That said, yes, you can use that. You can even run a different compositor nested so you get one single window with a desktop if you want.
- p0w3n3d 1y agoAh wayland. Many things changed since the time I've been using Linux in my professional work. However does Wayland support connectivity? I.e. can you display Wayland session on another computer via TCP/UDP? If not then Wayland won't work with wsl2 which is basically a VM
- Cu3PO42 1y agoNot in the same way that X does. However, Microsoft specifically implemented an RDP backend into Weston, which ships with WSL2. So the Linux Windows you see are actually being sent over RDP transparently.
- p0w3n3d 1y agowow RDP in Linux. The thing we used to fight for. I must see this. I'm really out of date
- otsukare 1y agoWaypipe[0] offers a Wayland alternative for sharing windows over the network. [0]: https://gitlab.freedesktop.org/mstoeckl/waypipe https://gitlab.freedesktop.org/mstoeckl/waypipe
- okanat 1y ago
- rcarmo 1y agoI’ve done it for almost a decade now, to the point of packaging “stacks” inside Docker for specific tasks: https://github.com/rcarmo/azure-toolbox https://github.com/rcarmo/azure-toolbox These days I have a Docker container with Remmina that I use as a bastion (fronted by Cloudflare and Authelia for OIDC), but everything else is LXC with xrdp and hardware acceleration for both application rendering and desktop streaming (xorgxrdp-glamor is much, MUCH better than VNC). I am, however, struggling to find a good way to stream Wayland desktops over RDP.
- aperturecjs 1y agoWith SKIFF_CONFIG=intel/desktop,skiff/core you get a Debian desktop running within a Docker container - see https://github.com/skiffos/skiffos https://github.com/skiffos/skiffos
- arcfour 1y agoYou know, it's funny—I always hear people say they want to keep their Windows-only applications and run Linux alongside it, but I made the switch almost a decade ago and honestly can't say I'm worse off for it. And frankly, there's never been a better time to make that leap; the Linux desktop has finally hit its stride and become genuinely mature, with the polish and features one would expect from a modern operating system. Apart from a handful of games, I haven't actually needed Windows for anything. So I'm curious—what Windows-only software is keeping you on it, OP?
- ireadmevs 1y agoNot OP, but for me is the music plugin industry that almost never provides a linux VST. Some will work with wine, some won’t. But for everything else I’m on linux as well.
- bodge5000 1y agoEven better, I have justification to buy yet more hardware synths I dont need
- j4coh 1y agoI’m not OP but for me I end up having trouble with games and maintaining dual boot for it isn’t worth it. Most recently I was trying to install gamescope on PopOS LTS for retro gaming, but it was too old of a distribution for gamescopes dependencies, so I upgraded to Cosmic and it broke my software KVM. I use PopOS because it has great NVIDIA support and I’ve run into issues before with other distros. At that point I switched back to windows but I’ll try again after a few months. I always keep trying. I think if I didn’t play games I’d be fine with Linux. I hate Windows except that everything just works.
- stavros 1y agoWith Steam, I haven't seen a game that doesn't work yet. I was just playing Clair Obscur yesterday, it worked great. I don't know about Gamescope, but I think you can run whatever Windows thing you want through Proton and it'll probably work well.
- thevinchi 1y agoI’ll just leave this here, thank me later: https://docs.linuxserver.io/images/docker-webtop/ https://docs.linuxserver.io/images/docker-webtop/ These images are top-notch, well documented, and have recently been refactored to use Selkies under the hood. Even with gamepad support, I’ve used these for running DOSbox, RetroArch, streaming video, and many other things. There’s even a mature extensibility layer for using their images as a base layer to add services and apps. Can’t speak highly enough of the linuxserver.io folks.
- MutableLambda 1y agoI actually wanted to try webtop for a long time, and did it only recently. I could not figure out these selkies for the life of me. It wanted a bunch of ports, was complaining about something all the time (don't remember, it's been a month). Might be a skill issue, but I've been using docker for the past 10 years. Moreover they want root access to the host system, which kind of defies one of the reasons to use containers. Is there a video that explains the benefits in a good way? I mean, if it's for gaming only, I can understand the use-case, but say you just want to run something like Gnu Radio in a container, why would I need 60 fps and root permissions for that.
- thevinchi 1y agofwiw: I’ve never run webtop with privileged mode or docker-in-docker enabled, those are both optional.
- throwaway290 1y ago> Containers are not isolated Operating Systems: Docker containers share the host kernel. This is what makes them lightweight and great for single services. Whereas desktop environments expect system services like (systemd, logind, udev, DBus) and device access to be available. Containers don’t provide that by default. I thought Docker images always run in a VM on non Linux systems, no? This guy is running Windows on host, right? Confusing
- cpuguy83 1y agoThey are talking just about what's in the container there, not the whole stack.
- francis-io 1y agoWorth mentioning Jess Frazelle was running desktop applications in docker a while ago. Not a full desktop, but also quicker to rebuild individual apps. https://blog.jessfraz.com/post/docker-containers-on-the-desktop https://blog.jessfraz.com/post/docker-containers-on-the-desk... https://github.com/jessfraz/dockerfiles https://github.com/jessfraz/dockerfiles
- finaard 1y agoI've been running stuff in LXC for ages (and before that, custom chroots). A while ago I made the switch to Wayland - and now started moving things over to podman, which has the added benefit of being able to share the stuff easily: https://github.com/aard-fi/tumbleweed-images/tree/master/wayland https://github.com/aard-fi/tumbleweed-images/tree/master/way... I use two different setups - on some systems I only run things like browsers in conatainers, on others I also run the desktop itself in a container. Not published yet are my helper scripts, that'll need some more cleaning up.
- firesteelrain 1y agoI recently learned about doing this because I was looking for a MATLAB container and it has one that provides full GUI experience.
- ponsfrilus 1y agoJust to brag about it, did it 10 years ago: https://github.com/ponsfrilus/arch-novnc https://github.com/ponsfrilus/arch-novnc
- augusto-moura 1y agoI did a similar thing some years ago, when trying to hack my own cloud gaming setup by using AWS GPU Linux instances. While it worked the price per hour wasn't worth it compared to just buying a good GPU. My idea was very similar, using TigerVNC and just launching Steam without a WM. Unfortunately I think I lost the code for it
- neurostimulant 1y ago> The usability was surprisingly decent. LibreOffice and GIMP worked fine, although there was a bit of a lag. I would estimate about 70% of native performance, but still very usable. You can get better performance and lower latency for your remote desktop and eliminate lag by using a gaming-focused remote desktop server, e.g. using Sunshine: https://github.com/LizardByte/Sunshine https://github.com/LizardByte/Sunshine . You will need to give it access to a gpu though.
- crowbahr 1y agoSunshine + Moonlight on the steam deck is an amazing combo. I've put 2k+ hours into games using that setup at this point. It's had me thinking a lot about remote computing.
- ec109685 1y agoThis article is bad in a lot of ways, but all of sudden it jumps to running Linux in a browser: “After my failed custom image attempt, I found a promising XFCE-based Debian image on Docker Hub. I downloaded it in minutes and, with a few commands, launched it. When I opened the URL, I was greeted by a fully functional Linux desktop, running right in my browser. The pure geek joy of seeing a complete OS served from inside a Docker container was a feeling I won’t forget. It worked” And on Windows, docker for Linux containers is just a VM, so this part isn’t really true: “Containers are not isolated Operating Systems: Docker containers share the host kernel. This is what makes them lightweight and great for single services. Whereas desktop environments expect system services like (systemd, logind, udev, DBus) and device access to be available. Containers don’t provide that by default
- shepherdjerred 1y agoI do this with Selkies to do Twitch Plays Pokemon, but for Discord The container runs KDE a web browser that runs an emulator. It's all GPU accelerated. https://github.com/selkies-project/docker-selkies-glx-desktop https://github.com/selkies-project/docker-selkies-glx-deskto... https://github.com/shepherdjerred/discord-plays-pokemon https://github.com/shepherdjerred/discord-plays-pokemon
- mcint 1y agoaiui "distrobox" is built to support these setups and experimentation, even more readily, including defaults to support: > The created container will be tightly integrated with the host, allowing sharing of the HOME directory of the user, external storage, external USB devices and graphical apps (X11/Wayland), and audio. https://distrobox.it/ https://distrobox.it/ > Why * Provide a mutable environment on an immutable OS, like ChromeOS, Fedora Silverblue, OpenSUSE Aeon/Kalpa, or SteamOS3 ... * Provide a locally privileged environment for sudoless setups (eg. company-provided laptops, security reasons, etc…) * To mix and match a stable base system (eg. Debian Stable, Ubuntu LTS, RedHat) with a bleeding-edge environment for development or gaming (eg. Arch, OpenSUSE Tumbleweed, or Fedora with the latest Mesa) * Leverage a high abundance of curated distro images for docker/podman to manage multiple environments. > Aims This project aims to bring any distro userland to any other distro supporting podman, docker, or lilipod. It has been written in POSIX shell to be as portable as possible and it does not have problems with dependencies and glibc version’s compatibility. > It also aims to enter the container as fast as possible, every millisecond adds up if you use the container as your default environment for your terminal: > Security implications Isolation and sandboxing are not the main aims of the project, on the contrary it aims to tightly integrate the container with the host. The container will have complete access to your home, pen drive, and so on, so do not expect it to be highly sandboxed like a plain docker/podman container or a Flatpak. distrobox create -n test > Create a new distrobox with Systemd (acts similar to an LXC): distrobox create --name test --init --image debian:latest --additional-packages "systemd libpam-systemd pipewire-audio-client-libraries" distrobox enter test I learned about it from the KDE wiki, thank you jriddell for leaving that nugget https://community.kde.org/Neon/Containers https://community.kde.org/Neon/Containers
- bornfreddy 1y agoVery interesting, thank you for sharing! Unfortunately it looks like sandbox mode [0] is not a goal, so it doesn't solve the main problem I have - running semi-trusted apps (e.g. Android Studio) and minimising their impact. Currently I just share X11 socket and run it in Docker. [0] https://github.com/89luca89/distrobox/issues/28 https://github.com/89luca89/distrobox/issues/28
- jarym 1y agoSince it was mentioned, is anyone else here using Kasm in a workplace setting? I use it myself and am loving it but I don't know many enterprise users of their stuff although I heard they're hot in the defence sector.
- giancarlostoro 1y ago> This entire experiment took place on a Windows 10 PC, driven by a specific question: what if you could have the best of both worlds? The idea of a full Linux environment running inside a Docker container, side-by-side with my standard Windows applications, was too intriguing to pass up. No reboots, no separate partitions—just a seamless, containerized Linux desktop. > No reboots, no separate partitions—just a seamless, containerized Linux desktop. > Windows 10 PC .... No reboots You're kidding right? Linux is no reboots, Windows... Well let's just say yet another reason I no longer daily Windows.