Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path to compose file being set as source for bind mount when source is not provided in compose file #820

Closed
ethan-haynes opened this issue Jan 19, 2018 · 3 comments · Fixed by #824

Comments

@ethan-haynes
Copy link

ethan-haynes commented Jan 19, 2018

Steps to reproduce:

1: make a docker-compose.yml file

version: "3.4"
services:
  nginx:
    image: nginx:alpine
    volumes:
      - type: bind
        target: /app

2: run stack deploy commands

$: docker stack deploy -c docker-compose.yml nginx

Results:
The directory of the compose file being set when a source is not passed to a volume of type bind (using the long compose syntax)

Run inspect on service

$: docker service inspect nginx_nginx
"Mounts": [
  {
    "Type": "bind",
    "Source": "/home/ubuntu/path/to/compose/file",
    "Target": "/app"
  }
]

Expected:
The cli equivalent produces the following error:
invalid mount config for type "bind": field Source must not be empty.

Output of docker version:

$: docker version
Client:
 Version:      17.09.1-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   19e2cf6
 Built:        Thu Dec  7 22:22:25 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.09.1-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   19e2cf6
 Built:        Thu Dec  7 22:28:28 2017
 OS/Arch:      linux/amd64
 Experimental: false
@thaJeztah
Copy link
Member

Should be fixed by #824

@thaJeztah thaJeztah added this to the 18.03.0 milestone Dec 20, 2018
@chimeworld
Copy link

Should this issue be closed @thaJeztah ?

@thaJeztah
Copy link
Member

Yes, this can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants