Skip to content

[BUG] Formatting manifest replaces docker file with exo file #527

@BenElgar

Description

@BenElgar
❯ cat docker-compose.yml
services:
  t0:
    image: bash
    command: "sleep infinity"
  t1:
    image: bash
    command: "sleep infinity"
    depends_on:
      - "t0"


❯ dexo manifest format docker-compose.yml

❯ cat docker-compose.yml
exo = "0.1"
components {
  network "default" {
    driver = "bridge"
    name   = "unnamed_default"
  }
  container "t0" {
    command        = "sleep infinity"
    container_name = "unnamed_t0_1"
    image          = "bash"
    labels         = { "com.docker.compose.project" = "unnamed", "com.docker.compose.service" = "t0" }
    networks       = ["unnamed_default"]
    _ {
      depends_on = ["default"]
    }
  }
  container "t1" {
    command        = "sleep infinity"
    container_name = "unnamed_t1_1"
    depends_on     = ["t0"]
    image          = "bash"
    labels         = { "com.docker.compose.project" = "unnamed", "com.docker.compose.service" = "t1" }
    networks       = ["unnamed_default"]
    _ {
      depends_on = ["default", "t0"]
    }
  }
}

❯ dexo manifest format docker-compose.yml
Error: yaml: unmarshal errors:
  line 1: cannot unmarshal !!str `exo = "...` into compose.Project

Error: invalid manifest
invalid manifest

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions