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

Windows podman installation without admin rights #22994

Open
JayDoubleu opened this issue Jun 12, 2024 · 12 comments
Open

Windows podman installation without admin rights #22994

JayDoubleu opened this issue Jun 12, 2024 · 12 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. stale-issue windows issue/bug on Windows

Comments

@JayDoubleu
Copy link

Feature request description

I'm using Windows 11 and have WSL2 installed. I downloaded Podman Desktop, which I was able to run without admin rights. However, when I open Podman Desktop, it tries to install Podman, which requires admin rights. I would like to use podman on windows with wsl2 without having to use admin rights.

Suggest potential solution

  • Provide instructions on how to install WSL2 and Podman using non-privileged commands on Windows 11, so that Podman Desktop can connect to it without requiring a separate Podman installation.
  • Suggest changes to the Podman installer so that it does not request administrator rights during installation.

Have you considered any alternatives?

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

@baude
Copy link
Member

baude commented Jun 12, 2024

If i remember correctly, you can use Podman, WSL, and Windows without administrative privileges. HyperV does require it. I believe the requirement is coming from Podman Desktop and therefore the issue should be filed against their github. I'll try and move the issue.

@baude baude transferred this issue from containers/podman Jun 12, 2024
@JayDoubleu
Copy link
Author

JayDoubleu commented Jun 12, 2024

@baude Are we sure this does not belong to containers/podman ?
It is podman installer what's requesting the admin rights after all.

Podman Desktop is flagging that Podman is missing. The Podman installer then requests admin rights.

I assume that if the Podman installer allowed non-privileged installation, I could initiate the WSL distro using the Podman machine command, which should then satisfy Podman Desktop?

image

@jeffmaury
Copy link

Should be move to containers/podman but admin rights are required because WSL installation/update may be required

@JayDoubleu
Copy link
Author

@jeffmaury Is there any script that I can run to just create WSL distro with necessary components ?
I already have all of the WSL requirements installed and I can install any distro without admin rights so I believe I should be able to provision a distro with podman on it

@jeffmaury
Copy link

Not that I am aware but you should ask on the podman repository

@benoitf benoitf transferred this issue from containers/podman-desktop Jun 13, 2024
@Luap99 Luap99 added kind/feature Categorizes issue or PR as related to a new feature. windows issue/bug on Windows labels Jun 13, 2024
@JayDoubleu
Copy link
Author

PS. This is currently excluding podman to be installed on devices in organisations with CE+ certifications

@l0rd
Copy link
Member

l0rd commented Jun 17, 2024

Podman installer on Windows indeed requires admin privileges. By default the installer copies podman binaries in C:/Program Files/RedHat/Podman and adds the key HKLM:\SOFTWARE\Red Hat\Podman in Windows registy. Those are operations that require admin privileges.

That said, using podman machine (podman machine init and podman machine start) require admin privileges when podman is configured to use Hyper-V but not when it's configured to use WSL.

@l0rd
Copy link
Member

l0rd commented Jun 17, 2024

A workaround, If you want to install podman on Windows without requiring admin privileges, is to download podman-remote-release-windows_amd64.zip from Podman release page and copy the binaries from the folder /usr/bin in the zip file to a directory that's in $env:PATH.

@JayDoubleu
Copy link
Author

Ok, so this seems to work well for me. As per your advice @l0rd:

  1. Downloaded podman-remote-release-windows_amd64.zip from the Podman release page.
  2. Moved the three binaries from within the usr/ directory to C:\Users\<username>\AppData\Local\Microsoft\WindowsApps, which seems to be the default local $env:PATH.
  3. I was able to execute podman commands in PowerShell.
  4. Ran podman machine init - It downloaded the tar.gz file and installed the "podman-machine-default" WSL distro.
  5. Ran podman machine start to start the WSL instance.
  6. I was then able to run the latest Podman Desktop, and Podman was detected without any issues.

It would be great to have end-to-end local installation option available within installer itself 👍

@l0rd
Copy link
Member

l0rd commented Jun 17, 2024

It would be great to have end-to-end local installation option available within installer itself 👍

I agree @JayDoubleu. This is something that can be improved. On the other hand, when prioritizing this issue, we have to consider how widespread this problem is. I suspect that we didn't get this request earlier because most Windows users are ok to run installers that require admin privileges.

Anyway thank you for reporting this issue and for testing the workaround that I have suggested.

@JayDoubleu
Copy link
Author

JayDoubleu commented Jun 17, 2024

It's true; I happened to be testing Podman as a Docker replacement on a corporate device, so I'm happy to perform some testing if and when this gets prioritized.

One of the reasons why Podman is considered here is its rootless aspect (although it's inside a WSL2 microVM, so it's already running in userspace). The idea of running Docker/Podman entirely without admin rights might be very appealing to companies with CE+ certifications where each admin access request is scrutinized.

Copy link

A friendly reminder that this issue had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. stale-issue windows issue/bug on Windows
Projects
None yet
Development

No branches or pull requests

5 participants