Skip to content

invalid MountType: "image" #3198

@0x6d68

Description

@0x6d68

Deploying to a swarm cluster does not work with volume type=image.

docker -H ssh://swarm.lan stack deploy -c compose.yaml test

Got: failed to create service test_with_image: Error response from daemon: invalid MountType: "image".

services:
  with_image:
    image: alpine
    command: "sleep 3600"
    deploy:
      replicas: 1
    volumes:
      - type: image
        source: nginx:alpine
        target: /mnt/image
        image:
          subpath: usr/share/nginx/html/  # https://github.com/moby/swarmkit/issues/3182
               
Client: Docker Engine - Community
 Version:           28.1.1
 API version:       1.49
 Go version:        go1.23.8
 Git commit:        4eba377
 Built:             Fri Apr 18 09:52:57 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.1.1
  API version:      1.49 (minimum version 1.24)
  Go version:       go1.23.8
  Git commit:       01f442b
  Built:            Fri Apr 18 09:52:57 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions