Skip to content

[BUG] include: functionality does not actually use env files #10842

@chrkr

Description

@chrkr

Description

The new include: functionality does not actually use the variables set in the env files of the included project(s).

I have already reported this to compose-go as compose-spec/compose-go#440 as this is obviously a problem with compose-go.

Steps To Reproduce

  1. Use the following files:
# compose.yaml
include:
  - path: subcompose.yaml
    env_file: sub.env
# subcompose.yaml
services:
  anyservice:
    image: ${SUB_VAR}
# sub.env
SUB_VAR=some_value
  1. Run e.g. docker compose config and see that the ${SUB_VAR} variable is not set.

Compose Version

2.20.2

Docker Environment

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions