[英]Docker nginx ports are not available
我正在嘗試在 docker 上使用 nginx 為 windows 使用
docker container run --publish 80:80 nginx
它收到如下錯誤:
C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
誰能給我解決方案......
如您所見,錯誤很明顯Ports are not available: listen tcp 0.0.0.0:80:
因為端口已被占用。 你有兩個選擇
80
container run --publish 81:80 nginx then localhost:81
現在打開 http://localhost:81 應該可以工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.