Skip to content

[feature parity \w docker-compose] Support !reset and !override tags #1114

Description

@theCalcaholic

Is your feature request related to a problem? Please describe.
podman-compose supports compose file merging, but gives no possibility to reset/delete sequence type values from the base yaml file. For example, assuming a merge with the command podman-compose -f base.yaml -f override.yaml it's impossible to remove a port configuration that has been defined on a service in base.yaml since any new definitions in override.yaml will be merged with the existing list.

Describe the solution you'd like
docker-compose offers yaml tags to deal with this situation: !override allows replacing the base configuration, while !reset allows removing the base configuration in the override config, e.g.:

# base.yaml
services:
  my-service:
    image: some/image:latest
    ports:
      - 8080:80
      - 443:443
# override.yaml
services:
  my-service:
    ports: !reset []
# override.yaml
services:
  my-service:
    ports: !override
      - 80:80

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions