英文:
I am able to install docker image & run from dockerhub, but mapping url does not shown (closed)
问题
I'm using Docker Toolbox on Windows 7, and when I run a command like 'docker run -p 5000:5000 -d in28min/todo-rest-api-h2:1.0.0.RELEASE
', it worked and the app executed.
-- Here it shows that the app has started.
Besides, the 'docker container ls
' command gives me the running port.
So, when I request the corresponding URL (http://localhost:5000/hello-world
), it does not respond (This site can't be reached). What can be the problem here? As far as I know, the '-p
' command allows us to request. Thanks in advance.
英文:
I m using docker toolbox in Windows 7, and when I run a command like
'docker run -p 5000:5000 -d in28min/todo-rest-api-h2:1.0.0.RELEASE
'
, it worked and app executed.
-- Here is shown that app started.
Besides 'docker container ls
' command give me running port.
So, when I request to corresponding URL(http://localhost:5000/hello-world
), it does not respond (This site can’t be reached). What can be a problem here? As far as I know, that '-p
' command allows us to request. Thanks in advance
答案1
得分: 0
我找到了解决方案。这是因为 'docker-machine ip' 不同于 Docker 工具箱。默认的 docker-machine IP 是 192.168.99.100,而不是 localhost。
英文:
I found solution. It is because of 'docker-machine ip'. which is different in docker toolbox. Default docker-machine ip is 192.168.99.100, not localhost.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论