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をsudoなしで(mac)

Last updated at Posted at 2024-11-24

エラー

sudoつけないとパーミッションがアレなんでってエラーが。

$ docker compose build
WARN[0000] The "HOST_UID" variable is not set. Defaulting to a blank string.
WARN[0000] The "HOST_GID" variable is not set. Defaulting to a blank string.
open /Users/iuchi/.docker/buildx/current: permission denied

対策

該当ファイルのオーナーを自分に。

$ sudo chown -R `whoami` ~/.docker/buildx/current

補足

whoamiはログインユーザー名(自分)の名前を返してくれるよ!

$ whoami
iuchi

確認環境

$ sw_vers
ProductName:            macOS
ProductVersion:         15.0.1
BuildVersion:           24A348
$ docker --version
Docker version 27.3.1, build ce12230
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?