在 Windows 上安装 Apache Superset 时,请按照本指南中提供的步骤进行操作, 我在使用 Docker Compose 设置 docker 容器时遇到错误(在 apache/superset 中克隆项目之后)。
docker compose pull
和
docker compose up -d
给我:
time="2024-04-20T21:18:08-03:00" level=warning msg="The \"CYPRESS_CONFIG\" variable is not set. Defaulting to a blank string."
time="2024-04-20T21:18:08-03:00" level=warning msg="The \"SCARF_ANALYTICS\" variable is not set. Defaulting to a blank string."
time="2024-04-20T21:18:08-03:00" level=warning msg="The \"CYPRESS_CONFIG\" variable is not set. Defaulting to a blank string."
validating C:\superset\superset\docker-compose.yml: services.superset.env_file.0 must be a string
我不知道如何修复此错误,因为它说找不到环境变量并且无法正确读取 env 文件。我在整个互联网、github 讨论和 stackoverflow 中进行了搜索,但成功率为零。
修改 C:\superset\superset\docker-compose.yml 文件并将以下行添加到 services 下的 yml 文件中:
env_file:
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
对于其他两个变量,根据您的要求在 docker-compose.yml 文件中将它们设置为 true/false。
将您的 docker 版本更新到最新版本(在 Windows 更新 docker 桌面上),因为您正在使用 compose 插件。 Compose 也将更新为 ~
v2.26.X
。这是 docker compose 的最新功能2.24
。