中提供的步骤在 Windows 上安装 Apache Superset 时,我在使用 Docker Compose 设置 docker 容器时遇到了错误(在中克隆项目之后)。

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 中进行了搜索,但成功率为零。


2 个回答
2

将您的 docker 版本更新到最新版本(在 Windows 更新 docker 桌面上),因为您正在使用 compose 插件。 Compose 也将更新为 ~ v2.26.X。这是 docker compose 的最新功能2.24

添加到此处的超集:

0

修改 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。

1

  • 目前这些已经是docker-compose 中的


    –