Skip to content
Discussion options

You must be logged in to vote

✅ Solution that worked for me with the Container Tools extension

The extension doesn’t run in a shell, so aliases and shell functions won’t work. I was able to make it work by introducing a wrapper script and configuring passwordless sudo.

  1. Wrapper script
    Replace /usr/local/bin/podman with a script that invokes sudo podman-real:

    sudo mv /usr/local/bin/podman /usr/local/bin/podman-real
    sudo tee /usr/local/bin/podman >/dev/null <<'EOF'
    #!/bin/bash
    exec sudo /usr/local/bin/podman-real "$@"
    EOF
    sudo chmod +x /usr/local/bin/podman
  2. Passwordless sudo
    Ensure both podman and podman-real can run without prompting for a password by updating sudoers:

    username ALL=(ALL) NOPASSWD: /usr/local/bin/pod…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@rrajpuro
Comment options

@bwateratmsft
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by rrajpuro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants