Using podman instead of regular docker with terraform.
My challenge here is not just using podman instead of docker under terraform but also the following:
- debian 13 wsl
- upgrading wsl1 vs wsl2 image
- windows client is a VM under hyper-v
I needed this because my Windows instance is a VM under Hyper-V
Set-VMProcessor -VMName "VMName" -ExposeVirtualizationExtensions $trueconversion to wsl2 runs a while
PS C:\Users\rrosso> wsl --set-version Debian 2...check this is true
❯ cat /etc/wsl.conf[boot]systemd=truecheck my wsl container is now v2
PS C:\Users\rrosso> wsl -l -v NAME STATE VERSION* Debian Stopped 2install podman if not done already
sudo apt updatesudo apt install -y podmansystemctl --user enable --now podman.socketsystemctl --user enable --now podman.socket
❯ systemctl status podman.socket○ podman.socket - Podman API Socket Loaded: loaded (/usr/lib/systemd/system/podman.socket; disabled; preset: enabled) Active: inactive (dead) Triggers: ● podman.service Docs: man:podman-system-service(1) Listen: /run/podman/podman.sock (Stream)test
❯ curl --unix-socket "$XDG_RUNTIME_DIR/podman/podman.sock" http://d/_pingOKset this before your terraform commands
❯ export DOCKER_HOST="unix://$HOME/podman.sock"