Skip to content

Parse Compose service network object form for aliases #116

Closed

Description

@thromel

Summary

container-compose fails to decode the Compose object form for service networks, which is required for aliases and per-network service options.

Environment

- OS: macOS 26.5.1 (25F80)
- Xcode: 26.5 (17F42)
- container: 1.0.0 (release, commit ee848e3)
- container-compose: 1.0.0 installed via Homebrew
- Architecture: arm64

Reproduction

compose.yml:

services:
  web:
    image: nginx:alpine
    networks:
      appnet:
        aliases:
          - web-alias

  probe:
    image: busybox:latest
    depends_on:
      - web
    networks:
      - appnet
    command: ["sh", "-c", "wget -qO- http://web-alias"]

networks:
  appnet:

Run:

container-compose --file compose.yml up -d

Actual behavior

Error: DecodingError.typeMismatch: expected value of type Sequence. Path: services.web.networks. Debug description: Expected to decode Sequence but found Node instead.

Expected behavior

Compose supports both forms:

networks:
  - appnet

and:

networks:
  appnet:
    aliases:
      - web-alias

container-compose should parse the object form and either:

  • apply supported per-network service settings, or
  • produce a targeted unsupported-field warning while continuing for settings it can support.

Aliases may depend on the broader service-discovery/DNS work, but the YAML decoder should accept the Compose object shape.

Activity

  1. thromel commented on Jul 2, 2026

    @thromel
    ContributorAuthor

    Closing as completed by #119. Current main parses the Compose service network object form, including aliases; NetworkConfigurationTests covers the YAML shape from this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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