LoginSignup
14
5

More than 3 years have passed since last update.

docker runでエラーが出る時の対処法(docker: you are not authorized to perform this operation: server returned 401.)

Last updated at Posted at 2020-07-25
環境 バージョン
macOS Catalina 10.15.6
Docker 19.03.8

Macのターミナルからdocker runコマンドで起動しようとした時に
以下のようなエラーが発生したので、その対処法を備忘録としてまとめます。

docker: you are not authorized to perform this operation: server returned 401.
See 'docker run --help'.

###原因

どうやらDockerの**「Docker Content Trust(DCT)」**という検証機能が影響しているようでした。
これは、イメージが改ざんされていないか等を検証する機能なのですが、イメージに特に問題がないことが
わかっている場合は、以下のコマンドで環境変数を設定して、DCTを無効化します。

$ export DOCKER_CONTENT_TRUST=0

これで、docker runコマンドが実行できるようになりました。

14
5
1

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
14
5