Docker错误响应来自守护程序:端口不可用 – Mac

huangapple go评论98阅读模式
英文:

Docker Error response from daemon: Ports are not available - Mac

问题

我正在尝试在Mac上通过Docker/LaravelSail运行。启动Docker时,我收到以下错误信息:

“附加到 flow-laravel.test-1, flow-mysql-1
来自守护程序的错误响应:端口不可用:将端口TCP 0.0.0.0:80 -> 0.0.0.0:0公开:侦听TCP 0.0.0.0:80:绑定:地址已在使用中”

我理解80端口已在其他地方使用,但我在解决这个问题时遇到了困难。当我运行 docker ps 时,我得到了正在运行的 MySql 容器的 ID。

在Docker仪表板上,我可以看到如下情况Docker错误响应来自守护程序:端口不可用 – Mac

我尝试手动停止和启动 laravel-test1 容器,但没有成功。

我的问题是,我如何解决这个问题?

英文:

I am trying to get Docker/LaravelSail via Mac to function. When starting up Docker I receive the error

Attaching to flow-laravel.test-1, flow-mysql-1
Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:80 -> 0.0.0.0:0: listen tcp 0.0.0.0:80: bind: address already in use

I understand the 80 port is being used elsewhere, but I am having difficulty trying to solve this. When I run docker ps I get the mySql container ID which is functioning.

On the docker dashboard I can see the followngDocker错误响应来自守护程序:端口不可用 – Mac

I tried manually stopping and starting the laravel-test1 container but had no luck.

My question is, how can I solve this issue?

答案1

得分: 5

"在经过一番努力的搜索后,我找到了一个视频,其中添加了以下代码到.env文件

APP_PORT=89

通过添加上述行,现在错误已解决。同时也成功迁移了我的数据库。"

英文:

After an exhausting search, I came across a video which added this line of code to the .env file

APP_PORT=89

By adding the line above the error is now resolved. Also migrated my database without issue.

huangapple
  • 本文由 发表于 2023年4月6日 21:53:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/75950333.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定