我的操作系统是Windows 7,正在使用Docker Toolbox。我正在关注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 Tools一起安装,因此我打开它并看到了我的所有容器。我去了我的网络服务器“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键,您将立即获得所需的内容。
关于docker - Phalcon-compose和Docker Toolbox网络服务器看不到任何文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44869920/