eizedev / wsl2-podman

Script for installing WSL2 + podman and podman-compose (or docker and docker-compose)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Podman in WSL 2

Note: For Podman on Windows, see the 1st-party installation guide.

License

Getting Started

Prerequisites

Usage

  1. Clone or download this repository
  2. In an Administrator prompt, run the Install-ContainerRuntime.ps1 script
# Defaults to podman, add -Docker to install docker-ce instead
.\scripts\Install-ContainerRuntime.ps1

Known Issues

Absolute paths

By default, the shims created by the installation scripts do not support absolute paths for mounting. Instead you will have to either use relative paths or rewrite C:\ to /mnt/c/ and use forward slashes.

Alternatively, consider installing the WslInterop module for easier access from PowerShell.

Connecting to containers using localhost

Some applications automatically resolve localhost to 127.0.0.1 (IPv4), which Windows doesn't forward to WSL, without checking the Windows hosts file. This means you may experience problems connecting to the containers running in WSL when using localhost.

If you do experience this, try swapping localhost/127.0.0.1 for ::1 (TCP), [::1] (HTTP), or simply wsl.

No internet connectivity when using a VPN

Refer to the WSL troubleshooting page.

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue.

License

GPL

About

Script for installing WSL2 + podman and podman-compose (or docker and docker-compose)

License:GNU General Public License v3.0


Languages

Language:PowerShell 54.0%Language:Shell 46.0%