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?

localhost:8080にアクセスできない?Mac + Colima + Dockerの罠

Posted at

現象

後述の環境でコマンドdocker run -p 8080:80 -d nginxを実行し、ブラウザでlocalhost:8080にアクセスしたところ、下図のエラーが発生しました。
image.png

環境

項目 バージョン
ホストOS macOS Sequoia 15.4.1
Colima 0.8.1
Docker 28.1.1

対処

Macのシステム設定を変更することで、このエラーは解消しました。

  1. colima stopコマンドを実行してcolimaを停止する
  2. システム設定を開き、プライバシーとセキュリティ→フルディスクアクセス(下図赤枠)をクリック
    スクリーンショット 2025-05-19 17.03.29.png
  3. ターミナルのトグルボタンをオンにする(下図はオンの状態)
    image.png
  4. ターミナルを再起動してcolima startコマンドを実行する
  5. docker run -p 8080:80 -d nginxコマンドを実行する
  6. ブラウザでlocalhost:8080へアクセス
    スクリーンショット 2025-05-19 17.11.27.png
    無事にnginxサーバーへアクセスできました

参考にさせていただいた記事

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?