podman
wsl: emulate docker and docker-compose using podman
i'm using almalinux 9 as wsl distro, so the commands below is for almalinux.
bash
sudo dnf install podman podman-docker
sudo touch /etc/containers/nodockerdocker-compose must be installed in standalone mode.
bash
sudo curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-composeenable systemctl on wsl
txt
[boot]
systemd=truerun on powershell to restart wsl vm
powershell
wsl --shutdownopen wsl again, and enable systemctl
bash
sudo systemctl enable --now podman.socketprofit.
warnings about cgroupv2 manager and systemd on wsl2
to solve this
bash
WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available
WARN[0000] For using systemd, you may need to log in using a user session
WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1000` (possibly as root)
WARN[0000] Falling back to --cgroup-manager=cgroupfsyou need this
txt
[engine]
events_logger = "file"
cgroup_manager = "cgroupfs"