跳至主要内容

Podman in WSL2

· 閱讀時間約 1 分鐘

3 分鐘 跟 podman 當好朋友

Install WSL2

👉 Windows Subsystem for Linux Installation Guide for Windows 10

Install Ubuntu (Optional)

👉 Get Ubuntu - Microsoft Store

Install podman

👉 How to run Podman on Windows with WSL2

Install podman-compose

Install python3 and pip:

sudo apt-get -y install python3 python3-venv python3-pip
pip3 install podman-compose

Notice that you have to add ~/.local/bin to PATH

Integrate podman-compose and fish

Install the latest fish shell for fish_add_path if your fish is < 3.3.0:

# Check version
$ fish -v
fish, version 3.3.1

$ sudo apt-add-repository ppa:fish-shell/release-3
$ sudo apt-get update
$ sudo apt-get install fish

Check the official document if you use another distribution.

Add into ~/.config/fish/config.fish:

fish_add_path ~/.local/bin

Reference