无法使用我的Docker映像访问Spring Boot [英] Can't access Spring Boot with my docker image
问题描述
显然该应用程序运行正常,但是我无法通过浏览器访问它.
Apparently the application is running normally, but I can not access it through the Browser.
要获取我的docker映像:docker push renanshin/gs-spring-boot-docker
To get my docker image: docker push renanshin/gs-spring-boot-docker
这是我的Docker映像的Spring Boot的映像.
Here's an image of the Spring Boot of my Docker image.
推荐答案
After looking at the screenshot provided by the OP, it seems @MarkRotteveel's comment is right.
即,OP正在Windows上运行Docker,可能使用Windows的Docker Toolbox(基于 docker机器
的旧版本),并且在这种情况下, docker run-p 8080:8080…
不会将该服务公开给Windows主机上的 127.0.0.1:8080
,而是公开给另一个IP地址.
Namely, the OP is running Docker on Windows, probably using Docker Toolbox for Windows (the legacy distribution based on docker machine
), and it happens that in this case, docker run -p 8080:8080 …
won't expose the service to 127.0.0.1:8080
on the Windows host, but to a different IP address.
For details, see this page of the online doc and that other page.
这篇关于无法使用我的Docker映像访问Spring Boot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!