-
Notifications
You must be signed in to change notification settings - Fork 156
Add WSL-specific Podman documentation and troubleshooting guide #4190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d30a265
Initial plan
Copilot be13891
Add WSL-specific Podman documentation and troubleshooting guide
Copilot cead592
Fix list numbering and punctuation in Podman WSL troubleshooting guide
Copilot a0a76b1
Add TOC entry and restructure Podman WSL troubleshooting guide
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
title: Container runtime 'podman' could not be found in WSL | ||
adegeo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
description: Learn how to troubleshoot the error "Container runtime 'podman' could not be found" when using Podman in Windows Subsystem for Linux (WSL). | ||
ms.date: 08/04/2025 | ||
--- | ||
|
||
# Container runtime 'podman' could not be found in WSL | ||
|
||
.NET Aspire requires a container runtime to be available in the system PATH. This article describes how to resolve issues when Podman isn't found in Windows Subsystem for Linux (WSL) environments. | ||
|
||
## Symptoms | ||
|
||
When starting your .NET Aspire application, you see an error message similar to: | ||
|
||
```Output | ||
Container runtime 'podman' could not be found. The error from the container runtime check was: exec: "podman": executable file not found in $PATH | ||
``` | ||
|
||
This occurs even though running `podman images` or other Podman commands work successfully in your WSL terminal. | ||
|
||
## Cause | ||
|
||
This issue occurs in WSL environments when: | ||
|
||
- Podman is installed in a separate WSL distribution than where your .NET Aspire application is running. | ||
- You're using shell aliases instead of having the actual Podman executable in your PATH. | ||
- The Podman executable isn't available in the system PATH that .NET Aspire searches. | ||
|
||
.NET Aspire resolves container runtimes by searching for the executable in the system PATH. Shell aliases (like those defined in `~/.bash_aliases`) aren't recognized during this process. | ||
|
||
## Solution | ||
|
||
Choose one of the following solutions: | ||
|
||
### Install Podman in the current WSL distribution | ||
|
||
Install Podman directly in the WSL distribution where you're running your .NET Aspire application: | ||
|
||
```bash | ||
# For Ubuntu/Debian-based distributions | ||
sudo apt update | ||
sudo apt install -y podman | ||
``` | ||
|
||
For other distributions, see [Install Podman on Linux](https://podman.io/docs/installation#installing-on-linux). | ||
|
||
### Create a symbolic link | ||
|
||
If you have Podman installed elsewhere, create a symbolic link: | ||
|
||
```bash | ||
# Find where Podman is installed | ||
which podman-remote-static-linux_amd64 | ||
|
||
# Create a symbolic link in a directory that's in your PATH | ||
sudo ln -s /path/to/podman-remote-static-linux_amd64 /usr/local/bin/podman | ||
``` | ||
|
||
### Add Podman directory to PATH | ||
|
||
Add the directory containing the Podman executable to your PATH: | ||
|
||
```bash | ||
# Add to your shell profile | ||
echo 'export PATH="/path/to/podman/directory:$PATH"' >> ~/.bashrc | ||
source ~/.bashrc | ||
``` | ||
|
||
## Verify the solution | ||
|
||
Confirm that Podman is correctly configured: | ||
|
||
```bash | ||
# Check that Podman is in your PATH | ||
which podman | ||
|
||
# Verify Podman is working | ||
podman --version | ||
|
||
# Test that Podman can list containers | ||
podman ps | ||
``` | ||
|
||
All commands should succeed before running your .NET Aspire application. | ||
|
||
## See also | ||
|
||
- [Container runtime setup](../fundamentals/setup-tooling.md#container-runtime) | ||
- [Container runtime appears to be unhealthy](container-runtime-unhealthy.md) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.