Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Not working with docker-compose.yml #8

Closed
2Kable opened this issue Aug 16, 2016 · 2 comments
Closed

Not working with docker-compose.yml #8

2Kable opened this issue Aug 16, 2016 · 2 comments

Comments

@2Kable
Copy link

2Kable commented Aug 16, 2016

I'm unsure with the syntax, but I'm unable to create a volume using docker-compose, it fails when mounting it to a service

sshvolume:
    driver: vieux/sshfs
    driver_opts:
      sshcmd: <user>@<host>:<path-in-host>
      password: <password>

service:
      - sshvolume:<path-in-docker>

the command works in console:

docker volume create -d vieux/sshfs -o sshcmd=<user>@<host>:<path-in-host> -o password=<password> --name sshvolume

@vieux
Copy link
Owner

vieux commented Feb 9, 2017

@2Kable I have no issue with this compose file

version: "3"

services:
  worker:
    image: alpine
    command: sh -c "while true; do echo \`cat /etc/hostname\` >> /data/hostnames; sleep 1; done"
    volumes:
      - sshvolume:<path-in-docker>
    deploy:
      mode: replicated
      replicas: 2
      placement:
        constraints: [node.role != manager]

volumes:
  sshvolume:
    driver: vieux/sshfs
    driver_opts:
      sshcmd: <user>@<host>:<path-in-host>
      password: <password>

@vieux vieux closed this as completed Feb 9, 2017
@chrsch
Copy link

chrsch commented May 28, 2017

This issue probably is related to #15 . I have the same problem like @2Kable, but if I inspect the service I notice the problem ist basically the same as #15 and the volume created by compose is otherwise functional.

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

No branches or pull requests

3 participants