首页 > 解决方案 > Docker-compose 没有读取环境变量 COMPOSE_FILE

问题描述

我在 Docker 中使用 django cookiecutter 配置,我无法让 docker-compose 读取 $COMPOSE_FILE 环境变量。

我做了这个

export COMPOSE_FILE=local.yml

这是我运行 docker-compose up 或 build 时的结果:

Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

标签: pythondjangolinuxdockerdevops

解决方案


推荐阅读