10BC0 Docker stack deploy do not undersand volumes in windows format · Issue #1403 · docker/cli · GitHub
[go: up one dir, main page]

Skip to content

Docker stack deploy do not undersand volumes in windows format #1403

@eiximenis

Description

@eiximenis

Description

I am using Docker CE For Windows (Version 2.0.0.0-beta1-win75 (19925) and using docker stack deploy to deploy a workload against the local k8s cluster.

If I define a volume using "linux like" syntax it works OK:

    volumes:     
        -/c/tfs/eShopOnContainers/src/ApiGateways/Mobile.Bff.Shopping/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}

But If I use windows syntax it fails:

    volumes:      
        -c:\tfs\eShopOnContainers\src\ApiGateways\Mobile.Bff.Shopping\apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}

Then I receive on error:

Stack.compose.docker.com "eshop" is invalid: eshop: Invalid value: "null": conversion to kube entities failed: c:\tfs\eShopOnContainers\ApiGateways\Mobile.Bff.Marketing\apigw: only absolute paths can be specified in mount source

Note that if instead of c:\tfs\... I use something like \c\tfs\... (linux-syntax with no colon but with windows backslashes) I receive another error:

Stack.compose.docker.com "eshop" is invalid: spec.stack.services[1].volumes[0]: Invalid value: "\\c\\tfs\\eShopOnContainers\\src\\ApiGateways\\Mobile.Bff.Shopping\\apigw": not a valid volume name in Kubernetes: a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character

This is very unfortunate, because under windows, docker-compose changes the format of Linux paths to windows paths when using "docker-compose config". So, if I have a compose file with one volume:

- /c/tfs/eShopOnContainers/ApiGateways/Mobile.Bff.Marketing/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}

The output of docker-compose config is (linux slashes are converted to backslashes):

    volumes:
    - \c\tfs\eShopOnContainers\ApiGateways\Mobile.Bff.Marketing\apigw:/app/configuration:rw

But this format is not supported by docker stack deploy. This prevents me to use docker-compose config | docker stack deploy -c -.

Output of docker version:

Client: Docker Engine - Community
 Version:           18.09.0-ce-beta1
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        78a6bdb
 Built:             Thu Sep  6 22:42:13 2018
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0-ce-beta1
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       78a6bdb
  Built:            Thu Sep  6 22:49:35 2018
  OS/Arch:          linux/amd64
  Experimental:     true
 Kubernetes:
  Version:          v1.10.3
  StackAPI:         v1beta2

Output of docker info:

Containers: 84
 Running: 41
 Paused: 0
 Stopped: 43
Images: 212
Server Version: 18.09.0-ce-beta1
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.125-linuxkit
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.837GiB
Name: linuxkit-00155d016143
ID: M5NF:TR4Q:KLJD:VP6F:SWCS:RINA:BSWB:55AK:U4ON:QAM7:44TV:VKRV
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 241
 Goroutines: 211
 System Time: 2018-10-01T16:58:03.4059414Z
 EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

Additional environment details (AWS, VirtualBox, physical, etc.):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0