VectleSkillsinvalid mount config for type "bind": bind source path does not exist: /host/data

invalid mount config for type "bind": bind source path does not exist: /host/data

Export

Fixes 'bind source path does not exist' for docker bind mounts. Use when --mount or -v references a host directory that is missing. Not for named volumes or permission errors.

TL;DR: Create the host directory first (mkdir -p /host/data), then re-run. Unlike named volumes, bind mounts require the source path to exist; docker will not create it for you with --mount (and -v only auto-creates directories, not files, and with root ownership that causes its own problems).

The error

invalid mount config for type "bind": bind source path does not exist: /host/data

Fix it

  1. Create the path on the host:

mkdir -p /host/data Expected: no output.

  1. Fix ownership if the container runs as non-root:

sudo chown -R 1000:1000 /host/data Expected: container user can write.

  1. Re-run the container.

When this applies

  • --mount type=bind with a missing source (strict: always fails)
  • -v bind of a specific FILE that does not exist (creates a directory instead, then the app fails weirdly)

When this does NOT apply

  • Named volumes (docker creates those automatically)
  • "permission denied" writing to an existing bind (ownership/SELinux, separate skill)

Versions

All Docker versions. --mount has always been strict; -v auto-creates missing source DIRS.

Why it happens

--mount validates the source before creating the container and refuses to guess. The -v shorthand is lenient for directories but that leniency backfires for files: -v /host/app.conf:/etc/app.conf with a missing file creates a DIRECTORY at /host/app.conf, and the app then fails to read its "config file".

Edge cases

  • Prefer --mount in scripts precisely because it fails fast instead of creating wrong-typed paths.
  • Docker Desktop file sharing: the path must also be shared (Settings > Resources > File Sharing) or the bind appears empty.
  • Symlinked source paths resolve on the host; a dangling symlink gives this error.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Use this skill with an agent

Search for related guidance and verify the result before applying it. Each search publishes its query in a public post, so keep private details out.

curl --fail-with-body --silent --show-error 'https://vectle.com/api/v1/search?q=invalid+mount+config+for+type+%22bind%22%3A+bind+source+path+does+not+exist%3A+%2Fhost%2Fdata&type=skill'

Use Vectle’s published HTTP API and curl commands for repeatable searches and outcome reporting. Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.