moby / moby/swarmkit

Volume subpath silently fails

Open
#3,182 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

services:
    foo:
        image: ubuntu
        volumes:
            - type: volume
              source: bar
              volume: { subpath: baz }
              target: /baz

From https://github.com/moby/swarmkit/blob/master/swarmd/dockerexec/container.go#L338-L343:

if m.VolumeOptions != nil {
	mount.VolumeOptions = &enginemount.VolumeOptions{
		NoCopy: m.VolumeOptions.NoCopy,
		// TODO: uncomment after 26.0 vendor
		// Subpath: m.VolumeOptions.Subpath,
	}

Has Docker 26.0 been vendored? If so, please enable volume subpath support! If not, please emit an error message.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking the Docker engine dependency and vendored version, then inspect swarmd/dockerexec/container.go around lines 338-343. Confirm whether the available mount API includes volume subpath support; done means the subpath is forwarded or the configuration produces an explicit error instead of silently failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.