Skip to content

[Bug] Failed to Create Compose Project: cannot unmarshal !!map into string #11934

@WankkoRee

Description

@WankkoRee

Contact Information

No response

1Panel Version

v2.1.0

Problem Description

从 docker-compose 文件创建编排时会因为一些字段使用罕见的类型定义导致合法检测未通过。

# docker-compose.yml
...
    volumes:
      - type: bind  # line 36
        source: ./config.toml
        target: /bin/config.toml
      - /etc/timezone:/etc/timezone:ro
...

Steps to Reproduce

在 docker-compose 文件中将任意 service 的任意 volume 改为非字符串格式即可触发。

The expected correct result

No response

Related log output

创建编排 失败: parse docker-compose file failed: yaml: unmarshal errors:
  line 36: cannot unmarshal !!map into string

Additional Information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions