下面是我的docker命令:
docker run -p 8087:80 nginx:alpine
但是我不能访问
http://localhost:8087
日志:
$ 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 This site is inaccessible localhost does not allow connection.你对解决方案有什么想法吗?
发布于 2021-05-04 07:01:17
如果您使用的是Windows,则不要键入
http://localhost:8087在您的地址栏上,而不是键入您看到的与您的扩展底座机器关联的IP地址。
您可以通过在命令提示符下键入命令来查找它
docker-machine lshttps://stackoverflow.com/questions/63560016
复制相似问题