Skip to content
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

Automatically bind podman sockets for access by other WSL distributions #16660

Closed
n1hility opened this issue Nov 28, 2022 Discussed in #16130 · 2 comments
Closed

Automatically bind podman sockets for access by other WSL distributions #16660

n1hility opened this issue Nov 28, 2022 Discussed in #16130 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. windows issue/bug on Windows

Comments

@n1hility
Copy link
Member

Discussed in #16130

Originally posted by derkoe October 12, 2022
Is it possible to access the podman socket from another WSL distribution?

❯ wsl -l -v
  NAME                      STATE           VERSION
* Fedora                    Running         2
  podman-machine-default    Running         2

❯ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

❯ wsl -d Fedora docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
```</div>
@n1hility
Copy link
Member Author

Currently, if you want to do this, manually creating the bind is the recommended approach.

For example, for rootless:

touch /mnt/wsl/podman.sock
sudo mount --bind /var/run/user/1000/podman/podman.sock /mnt/wsl/podman.sock

For rootful:

touch /mnt/wsl/podman.sock
sudo mount --bind /var/run/podman/podman.sock /mnt/wsl/podman.sock

In the future, podman machine start can help by automatically binding into /mnt/wsl in a way that is compatbile with multiple machines, like so:

/mnt/wsl/podman/podman-machine-default-rootless.sock
/mnt/wsl/podman/podman-machine-default-rootful.sock
/mnt/wsl/podman/other-rootless.sock
/mnt/wsl/podman/other-rootful.sock

@n1hility n1hility added kind/feature Categorizes issue or PR as related to a new feature. windows issue/bug on Windows labels Nov 28, 2022
@gbraad
Copy link
Member

gbraad commented Nov 29, 2022

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. windows issue/bug on Windows
Projects
None yet
Development

No branches or pull requests

2 participants