Update readmes regarding wsl2 devcontainer setup

This commit is contained in:
2025-11-30 22:07:29 +00:00
parent 5865d9dbe5
commit 3fa5bf8360
2 changed files with 20 additions and 16 deletions

View File

@@ -14,6 +14,9 @@ sudo apt install -y podman
# Ensure Podman version is ≥ 4.9.3:
podman --version
# Add current user to uucp group for Podman socket access
#sudo usermod -a -G uucp $(whoami)
```
## ⚙️ 2. Enable systemd and Podman socket
@@ -34,6 +37,10 @@ wsl --shutdown
Enable Podman socket:
```bash
# Enable linger to allow user services to run without active login
# Without this, the command below may return: Failed to connect to bus: No such file or directory
loginctl enable-linger $USER
systemctl --user enable --now podman.socket
```
@@ -41,12 +48,7 @@ If `podman.socket` is masked or fails to start, create a custom service:
```bash
mkdir -p ~/.config/systemd/user
vim ~/.config/systemd/user/podman.service
```
Paste:
```ini
cat > ~/.config/systemd/user/podman.service <<EOF
[Unit]
Description=Podman API Service
Requires=podman.socket
@@ -59,6 +61,7 @@ KillMode=process
[Install]
WantedBy=default.target
EOF
```
Reload and enable:
@@ -71,7 +74,7 @@ systemctl --user enable --now podman.socket
Verify:
```bash
curl --unix-socket /run/user/1000/podman/podman.sock http://localhost/_ping
#curl --unix-socket /run/user/1000/podman/podman.sock http://localhost/_ping
```
## 🧠 3. Configure Podman registry (to avoid interactive prompts)