首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Docker暴露端口不可达

Docker暴露端口不可达
EN

Stack Overflow用户
提问于 2020-08-24 19:21:26
回答 1查看 88关注 0票数 1

下面是我的docker命令:

docker run -p 8087:80 nginx:alpine

但是我不能访问

http://localhost:8087

日志:

代码语言:javascript
复制
    $ docker run -p 8087:80 nginx:alpine
    /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to 
    perform configuration
    /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
    /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by- 
    default.sh
    10-listen-on-ipv6-by-default.sh: Getting the checksum of 
    /etc/nginx/conf.d/default.conf
    10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in 
    /etc/nginx/conf.d/default.conf
    /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on- 
    templates.sh
    /docker-entrypoint.sh: Configuration complete; ready for start up
代码语言:javascript
复制
  This site is inaccessible localhost does not allow connection.

你对解决方案有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2021-05-04 07:01:17

如果您使用的是Windows,则不要键入

代码语言:javascript
复制
http://localhost:8087

在您的地址栏上,而不是键入您看到的与您的扩展底座机器关联的IP地址。

您可以通过在命令提示符下键入命令来查找它

代码语言:javascript
复制
docker-machine ls
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63560016

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档