英文:
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。
我尝试手动停止和启动 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 followng
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论