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

Volume not mounting Ubuntu via WSL on Windows #4852

Closed
J-Fricke opened this issue May 22, 2017 · 3 comments
Closed

Volume not mounting Ubuntu via WSL on Windows #4852

J-Fricke opened this issue May 22, 2017 · 3 comments

Comments

@J-Fricke
Copy link

  • Ubuntu via WSL on Windows 10 Pro 1703
  • Docker version 17.03.1-ce, build c6d412e
  • docker-compose version 1.8.0, build unknown

Started here to get Ubuntu via WSL on Windows working following instructions here: https://github.com/EugenMayer/docker-sync/wiki/docker-sync-on-Windows
Once that was working with hello-world container, this error reared it's head:

Error

ERROR: for web  Cannot start service web: error while mounting volume 
'/var/lib/docker/volumes/web-sync/_data': 
error while mounting volume with options: 
type='none' device='/home/User/Documents/dev/' o='bind': no such file or directory
Encountered errors while bringing up the project.
EXCEPTION: #<Docker::Compose::Error: 'up' failed with status 'pid 68 exit 1': Starting web>
MESSAGE: 'up' failed with status 'pid 68 exit 1': Starting web

docker-compose.yml - relevant parts to this container/volume

  web:
    container_name: web
    image: web:latest
    build:
       context: ./
    networks:
      - net
    volumes:
      - web-sync:/web:nocopy
    ports:
      - "80:80"
      - "443:443"
volumes:
  web-sync:
    external: true

docker-sync.yml - Has where volume is mapping to

version: "2"
options:
  verbose: true
syncs:
  web-sync:
    src: '~/Documents/dev/'
    sync_host_port: 10871
    sync_excludes: ['.git', 'node_modules', '.idea', '.DS_Store']
    watch_excludes: ['current', 'logs', 'sphinx/var', 'xdebug']
    watch_args: '-v'

Note: ~ is working as expected, can see in the error it's expanding and also have tested hard coding in the path. Issue happens when attempting start using docker-sync-stack start and docker-compose up. From this I'm gathering it's an issue with docker-compose more than docker-sync. I have an issue reported here initially: EugenMayer/docker-sync#402

Possibly also related to: #3073 & #3285

docker info

Containers: 3
 Running: 2
 Paused: 0
 Stopped: 1
Images: 56
Server Version: 17.03.1-ce
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
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.27-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934 GiB
Name: moby
ID: UIJJ:XMDL:ZNMK:I4NM:EEV3:6PAI:NYNZ:NBXI:UB2R:GLNK:CEHL:IU6B
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 27
 Goroutines: 42
 System Time: 2017-05-22T21:10:03.6911824Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
@shin-
Copy link

shin- commented May 22, 2017

microsoft/WSL#1854

@rfay
Copy link
Contributor

rfay commented Oct 24, 2018

Anybody who hit this issue will be interested in the article on using Docker with WSL: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly#ensure-volume-mounts-work

@BenHizak
Copy link

BenHizak commented May 1, 2019

Thank you @rfay. Following the article solved my problem

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

No branches or pull requests

4 participants