Mounting smb volume with subpath option in docker compose

Currently running docker 26.3 and 26.4 on Rocky Linux 8 and 9 respectively. I’m trying to create a media stack using docker compose with a single cifs volume (v3.0) for application config files, with subdirectories for each app. I would like to attach the individual subdirectories of the volume on a per-application basis using the subpath argument, but I’m running into issues with the argument. I’ve trimmed the stack down to a single app for troubleshooting, and still receiving the same issue. Below is the docker compose command:

services:
    
  jackett:
    image: linuxserver/jackett
    container_name: jackett
    environment:
      - PUID=1230
      - PGID=1230
      - TZ=America/New_York
    volumes:
      - /media/storage/Torrents:/downloads
      - type: volume
        source: Config
        target: /config
        volume:
          nocopy: true
          subpath: Jackett

    ports:
      - 9117:9117
    restart: unless-stopped
    
volumes:
  Movies:
    driver: local
    driver_opts:
      type: cifs
      device: "//192.168.x.y/Download/mediastack/Movies"
      o: "username=user,password=pass,vers=3.0"
  TV:
    driver: local
    driver_opts:
      type: cifs
      device: "//192.168.x.y/Download/mediastack/TV Shows"
      o: "username=user,password=pass,vers=3.0"
  Music:
    driver: local
    driver_opts:
      type: cifs
      device: "//192.168.x.y/Download/mediastack/Music"
      o: "username=user,password=pass,vers=3.0"  
  Config:
    driver: local
    driver_opts:
      type: cifs
      device: "//192.168.x.y/Download/mediastack/Config"
      o: "username=user,password=pass,vers=3.0"

When I comment the following lines, the command completes successfully, and mounts /Download/mediastack/Config to /config. When I uncomment the lines (with or without nocopy: true) I get the following error
failed to deploy a stack: validating /data/compose/24/docker-compose.yml: services.jackett.volumes.1.volume Additional property subpath is not allowed

What I would like to do is mount /Download/mediastack/Config/Jackett to /config without creating a separate smb volume for each application. is this possible?

Please share the output of docker info

Here’s 26.1.3 running on Rocky 8

 Version:    26.1.3
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 11
  Running: 11
  Paused: 0
  Stopped: 0
 Images: 16
 Server Version: 26.1.3
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8b3b7ca2e5ce38e8f31a34f35b2b68ceb8470d89
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 4.18.0-553.el8_10.x86_64
 Operating System: Rocky Linux 8.10 (Green Obsidian)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.516GiB
 Name: docker.dmz.domain.tld
 ID: <-this is an ID->
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

and 26.1.4 running on Rocky 9

[root@rockylinux Prometheus]# docker info
Client: Docker Engine - Community
 Version:    26.1.4
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 12
 Server Version: 26.1.4
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.14.0-427.18.1.el9_4.x86_64
 Operating System: Rocky Linux 9.4 (Blue Onyx)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.504GiB
 Name: rockylinux
 ID: <-This is an ID->
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

If I had to guess I would say you are using Docker Compose v1 (docker-compose) instead of Docker Compose v2 (docker compose) and the old compose didn’t support subpath which is a pretty new feature and v1 is not supported anymore.