0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Podmanインストール時のUID/GIDに関する設定

Posted at

エラー発生状況

  • podmanをUbuntu20.04にインストール後、podmanコマンド動作確認時に下記のエラーが発生
    $ podman version
    
    ERRO[0000] cannot find UID/GID for user $USER: No subuid ranges found for user "$USER" in /etc/subuid - check rootless mode in man pages.
    
    WARN[0000] using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids
    
    Version:      3.4.2
    API Version:  3.4.2
    Go Version:   go1.15.2
    Built:        Thu Jan  1 09:00:00 1970
    OS/Arch:      linux/amd64
    ``
    

解決策

  • UID, GIDのマッピング設定を行い、 podmanを再起動
    $ sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $USER
    $ podman system migrate
    $ systemctl --user restart podman.socket
    

解決までの経緯

  • UID, GID のマッピングを確認するとどちらも出力なし
    $ cat /etc/subuid
    $ cat /etc/subgid
    
  • 設定ファイルがないため、設定する
    $ sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $USER
    
  • 確認
    $ grep $USER /etc/subuid /etc/subgid
    /etc/subuid:$USER:100000:65536
    /etc/subgid:$USER:100000:65536
    
  • podman再起動
    $ systemctl --user restart podman.socket
    
  • podmanコマンド動作確認
    $ podman version
    Version:      3.4.2
    API Version:  3.4.2
    Go Version:   go1.15.2
    Built:        Thu Jan  1 09:00:00 1970
    OS/Arch:      linux/amd64
    

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?