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?

Dockerグループにユーザを追加

Last updated at Posted at 2024-09-03

環境 Fedora
linuxサーバ上でdockerをbuildしようとすると、下記のようなエラーに遭遇

ERROR: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied

自分のユーザーがdockerデーモンにアクセスする権限を持っていない。

以下は調べてみた感じの解決策。

1: dockerコマンドをsudo付きで実行

いちいちsudo dockerとやる方法。面倒臭い

2 : dockerグループにユーザを追加

以下のコマンドでユーザ追加

sudo usermod -a -G docker $USER

再起動

sudo reboot

これがスタンダートなやり方らしい。

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?