Phalcon-compose & Docker 工具箱网络服务器看不到任何文件
Phalcon-compose & Docker Toolbox web-server sees no files
我的 OS 是 Windows 7,我正在使用 Docker 工具箱。我正在学习 this 教程,但后来我在尝试打开网页时卡住了,因为我的浏览器说它无法建立连接。
variables.env(其余默认):
# Application
WEB_DOCUMENT_ROOT=/project/public
WEB_ALIAS_DOMAIN=localhost
APPLICATION_CACHE=/project/cache
APPLICATION_LOGS=/project/logs
# production | development | staging | testing
APPLICATION_ENV=development
主持人:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
然后我发现有一个名为 Kitematic 的程序已经安装了 Docker 工具,所以我打开它并看到了我所有的容器。我去了 "wildlife_app_1" 这是我的网络服务器,看到一个带有警告的控制台:
[WARNING] WEB_DOCUMENT_ROOT does not exists with path "/project/public"!
有一个名为"exec"的按钮可以打开容器的终端,所以我打开它,发现在“/project”中实际上没有"public"这样的目录。
有谁知道如何解决这个问题?提前致谢!
您必须在 hosts
文件中使用您的主机(本地计算机 IP),例如。 192.168.1.129
。注意:这里的192.168.1.129
IP地址只是为了举例。
您通常可以使用命令提示符或终端快速找到信息。在Windows中,您可以打开“开始”菜单,搜索“命令提示符”,然后按“Enter”。然后在出现的命令提示符中键入 ipconfig
并按 Enter——您将立即找到您要查找的内容。
以下是解决方法而不是解决方案,但无论如何。我已经改变了“。”配置文件中的点以及项目目录的绝对路径。
之前:
- ./application:/project
- ./cache:/project/cache
- ./logs:/project/logs
之后:
- C:/Users/Dmitriy/Desktop/projects/Wildlife/application:/project
- C:/Users/Dmitriy/Desktop/projects/Wildlife/cache:/project/cache
- C:/Users/Dmitriy/Desktop/projects/Wildlife/logs:/project/logs
现在可以使用了。
我的 OS 是 Windows 7,我正在使用 Docker 工具箱。我正在学习 this 教程,但后来我在尝试打开网页时卡住了,因为我的浏览器说它无法建立连接。
variables.env(其余默认):
# Application
WEB_DOCUMENT_ROOT=/project/public
WEB_ALIAS_DOMAIN=localhost
APPLICATION_CACHE=/project/cache
APPLICATION_LOGS=/project/logs
# production | development | staging | testing
APPLICATION_ENV=development
主持人:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
然后我发现有一个名为 Kitematic 的程序已经安装了 Docker 工具,所以我打开它并看到了我所有的容器。我去了 "wildlife_app_1" 这是我的网络服务器,看到一个带有警告的控制台:
[WARNING] WEB_DOCUMENT_ROOT does not exists with path "/project/public"!
有一个名为"exec"的按钮可以打开容器的终端,所以我打开它,发现在“/project”中实际上没有"public"这样的目录。
有谁知道如何解决这个问题?提前致谢!
您必须在 hosts
文件中使用您的主机(本地计算机 IP),例如。 192.168.1.129
。注意:这里的192.168.1.129
IP地址只是为了举例。
您通常可以使用命令提示符或终端快速找到信息。在Windows中,您可以打开“开始”菜单,搜索“命令提示符”,然后按“Enter”。然后在出现的命令提示符中键入 ipconfig
并按 Enter——您将立即找到您要查找的内容。
以下是解决方法而不是解决方案,但无论如何。我已经改变了“。”配置文件中的点以及项目目录的绝对路径。
之前:
- ./application:/project
- ./cache:/project/cache
- ./logs:/project/logs
之后:
- C:/Users/Dmitriy/Desktop/projects/Wildlife/application:/project
- C:/Users/Dmitriy/Desktop/projects/Wildlife/cache:/project/cache
- C:/Users/Dmitriy/Desktop/projects/Wildlife/logs:/project/logs
现在可以使用了。