Skip to content

Marshalling produces invalid compose file #521

@azukaar

Description

@azukaar

Using project.MarshalYAML() with extra_hosts causes invalid output

ex.

    extra_hosts:
      - host.docker.internal:host-gateway

will give

    extra_hosts:
    - host.docker.internal=host-gateway

which produces an error because docker compose expect the ip after :

the fix would be to change = to : in here https://github.com/compose-spec/compose-go/blob/main/types/hostList.go#L43

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions