Skip to content

Instantly share code, notes, and snippets.

@scbedd
Last active November 4, 2021 14:07
Show Gist options
  • Save scbedd/15cf41b81a508ce7f506ae44ec3e2be9 to your computer and use it in GitHub Desktop.
Save scbedd/15cf41b81a508ce7f506ae44ec3e2be9 to your computer and use it in GitHub Desktop.
Podman Installation on WSL2. Cribbed directly from text convo with @mikeharder

Podman Installation on WSL/2

Prereq:

  • Windows 10 > 19xx
  • WSL2 Configured
  • Ubuntu 20.04 Image on Windows Store. (Not Ubuntu LTS. Not plain Ubuntu)

Installed in wsl2 Ubuntu20.04 using these commands:

cd ./etc/os-release
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add -
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install podman

Then this command to run test-proxy (just replaced "docker" with "podman")

podman run --pull always -it --rm --network host -e Logging__LogLevel__Microsoft=Warning azsdkengsys.azurecr.io/engsys/testproxy-lin:latest

Other Suggestions

One more tip to make WSL2 "pure" (no windows stuff in PATH, cannot run windows exes)

From within your WSL instance, create a file /etc/wsl.conf. Then add the following interop section with any text editor in Linux.

[interop]
enabled=false # enable launch of Windows binaries; default is true
appendWindowsPath=false # append Windows path to $PATH variable; default is trueSave that file and exit from wsl.exe. Now whenever WSL is executed Windows paths will not appended to Linux $PATH environment variable.

You may need to shutdown the current instance of wsl with wsl --shutdown or wsl -t for changes to take effect.

@danieljurek
Copy link

danieljurek commented Nov 4, 2021

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment