From 379478835d5732fbbf03ce135fb9e7da790a9e49 Mon Sep 17 00:00:00 2001 From: nycki Date: Mon, 3 Nov 2025 08:13:41 -0800 Subject: [PATCH] winpodman --- content/blog/28-winpodman.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 content/blog/28-winpodman.md diff --git a/content/blog/28-winpodman.md b/content/blog/28-winpodman.md new file mode 100644 index 0000000..9d2dcb8 --- /dev/null +++ b/content/blog/28-winpodman.md @@ -0,0 +1,35 @@ +--- +date: 2025-11-03 +title: winpodman +description: use podman to run linux code in a container on windows +preview_image: +tags: programming +permalink: /blog/28/ +--- + +my windows machine is a surface tab 5 LTE from like 2015 and it has fairly limited internal storage so most of my code is on a 512GB microsd card that I leave connected at all times. + +this used to work fine. when you start WSL (windows subsystem for linux), it mounts C:\ as /mnt/c and D:\ as /mnt/d. But that doesn't seem to work anymore as of WSL 2.6.0, and rolling back didn't fix it either. + +apparently they [broke this on purpose?!](https://github.com/microsoft/WSL/issues/11931) + +on Podman Desktop you can work around this, using `podman machine ssh` to go inside the Podman virtual machine and tinker with its drive mounts. So I did! + +Assuming you have Podman Desktop installed on Windows 10, do the following: + +```ps +podman machine stop +podman machine set --rootful +podman machine start +podman machine ssh +sudo echo 'D: /mnt/d drvfs defaults,uid=100,gid=1000 0 0' >> /etc/fstab +sudo mkdir /mnt/d +sudo mount -a +exit +``` + +the "set --rootful" step is only needed if you want to give podman read-write access to files (e.g. if you are running a container that stores data on the host). + +now you should be able to run your [LAMP stack in podman](https://codeberg.org/nupanick/xp-php) on windows again :3 + +ok bye!