#12036·coolify

Long-form bind mappings lose read_only and bind options during application parsing

Author: ggwpzillaCreated Sep 27, 2026Updated Sep 27, 2026

Problem

applicationParser() accepts long-form Docker Compose bind mappings, but after validating and normalizing them it collapses the mapping to short source:target syntax.

That conversion discards long-form mapping fields such as read_only and nested bind options.

Minimal reproduction

Parse an application Compose definition containing:

yaml
services:
  app:
    volumes:
      - type: bind
        source: /host/existing-data
        target: /data
        read_only: true
        bind:
          create_host_path: false

Actual behavior

The parsed volume becomes a short-form string equivalent to:

/host/existing-data:/data

As a result, read_only: true and bind.create_host_path: false are no longer present in the parsed Compose mapping.

Expected behavior

Long-form bind volumes should remain mappings after parsing. Source normalization may update source, but the parser should preserve type, target, read_only, nested bind options, and other supported sibling mapping fields.

Root cause

In the array-form type: bind path, applicationParser() validates and normalizes the bind source, then reconstructs the volume as short-form source:target syntax. That reconstruction discards the original long-form mapping fields.

Related context

#11882 describes stale volume-mode leakage across loop iterations into object/array bind mounts. It is related but not a duplicate: this report is limited to field loss when applicationParser() collapses a long-form bind mapping. This report does not claim that serviceParser() is fixed.

Verification and version context

Focused regression coverage confirms the pre-fix semantic failure for:

  • read_only: true
  • bind.create_host_path: false
  • a complete long-form bind mapping

The proposed fix preserves the long-form mapping while retaining source normalization. It was validated in an isolated current-main environment and in a documented local Coolify development instance.

AI assistance

AI used: Hermes Agent and associated AI-assisted workflow. The submitting contributor reviewed and approved this report.