【发布时间】:2020-04-06 19:28:27
【问题描述】:
我是 docker 新手,我正在努力运行一个我想在我的本地主机中访问的图像。 这是我使用的顺序。
1.docker-machine start default (starting vm)
2.docker-machine env
3.(coping the @for command which has displayed and paste to my terminal)
4.docker run -d -p 127.0.0.1:8000:80 image_id
it generates the long string, container I guess
5.docker container run image_id - this says that "Application startup complete."
之后,我想在我的浏览器中使用上述 IP 访问它。该页无法显示。我究竟做错了什么 ?我是windows用户
这也是运行最后一条命令后的终端消息:
[2020-04-06 19:50:15 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2020-04-06 19:50:15 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2020-04-06 19:50:15 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2020-04-06 19:50:15 +0000] [7] [INFO] Booting worker with pid: 7
[2020-04-06 19:50:15 +0000] [7] [INFO] Started server process [7]
[2020-04-06 19:50:15 +0000] [7] [INFO] Waiting for application startup.
[2020-04-06 19:50:15 +0000] [7] [INFO] Application startup complete.
【问题讨论】:
-
您是如何尝试访问浏览器上的应用程序的?确保您使用的是
http://localhost:8000
标签: docker docker-machine