Skip to content

[question] run nerdctl as root but without sudo #341

Closed

Description

@shyim

Hey,

is it possible to use nerdctl on normal account but with root mode? Like in docker adding the current user to the docker group 🤔

Activity

  1. added
    question
    on Sep 2, 2021
  2. tigerinus commented on Nov 19, 2021

    @tigerinus

    same question here - any anwser yet?

  3. AkihiroSuda commented on Nov 22, 2021

    @AkihiroSuda
    Member

    is it possible to use nerdctl on normal account but with root mode? Like in docker adding the current user to the docker group

    No, due to #473 (comment) .

    Workaround is alias nerdctl=sudo nerdctl, or set SETUID on nerdctl binary.
    (In the latter case, the nerdctl binary should be placed in ~/bin, and chmod 700 ~/bin)

  4. AkihiroSuda commented on Nov 30, 2021

    @AkihiroSuda
    Member

    Added a documentation about this in https://github.com/containerd/nerdctl/blob/master/docs/faq.md#does-nerdctl-have-an-equivalent-of-sudo-usermod--ag-docker-user-

    mkdir -p $HOME/bin
    chmod 700 $HOME/bin
    cp /usr/local/bin/nerdctl $HOME/bin
    sudo chown root $HOME/bin/nerdctl
    sudo chmod +s $HOME/bin/nerdctl
    export PATH=$HOME/bin:$PATH
    
  5. locked and limited conversation to collaborators on Jan 31, 2022
  6. converted this issue into a discussion #766 on Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions