Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Incorrect merge of service's environment when using map #323

@dustinrc

Description

@dustinrc

Given the two files:

# docker-compose.yml
version: '2'
services:
  simple:
    image: busybox
    environment:
      alpha: one
      bravo: two
      zulu: twenty-six
    command: env

and

# docker-compose.override.yml
version: '2'
services:
  simple:
    environment:
      charlie: three
      bravo: four

the expected result is an environment with alpha=one, bravo=four, charlie=three and zulu=twenty-six. This is the outcome when using docker-compose, but with libcompose the environment only includes bravo=four and charlie=three.

If the second file defines environment as a list of strings:

# docker-compose.override.yml
version: '2'
services:
  simple:
    environment:
      - charlie=three
      - bravo=four

then the merge is correct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions