Skip to content

Docker image doesn't work on Windows when volume is mounted.  #1325

@pawanrawal

Description

@pawanrawal

Docker image runs fine on Windows when no volume is mounted.

docker run -it -p 8080:8080 -p 9090:9090 --name dgraph dgraph/dgraph dgraph --bindall=true

but it throws an error when we try to mount a volume

docker run -it -p 8080:8080 -p 9090:9090 -v ~/dgraph:/dgraph --name dgraph dgraph/dgraph dgraph --bindall=true

Error:

2017/08/07 10:28:31 Error while creating badger KV WAL store error: sync w: invalid argument 
Directory entry for compaction log 
github.com/dgraph-io/badger.newLevelsController 
        /home/travis/gopath/src/github.com/dgraph-io/badger/levels.go:142 
github.com/dgraph-io/badger.NewKV 
        /home/travis/gopath/src/github.com/dgraph-io/badger/kv.go:199 
github.com/dgraph-io/dgraph/dgraph.(*ServerState).initStorage 
        /home/travis/gopath/src/github.com/dgraph-io/dgraph/dgraph/server.go:69 
github.com/dgraph-io/dgraph/dgraph.NewServerState 
        /home/travis/gopath/src/github.com/dgraph-io/dgraph/dgraph/server.go:54 
main.main 
        /home/travis/gopath/src/github.com/dgraph-io/dgraph/cmd/dgraph/main.go:688 
runtime.main 
        /home/travis/.gimme/versions/go1.8.linux.amd64/src/runtime/proc.go:185 
runtime.goexit 
        /home/travis/.gimme/versions/go1.8.linux.amd64/src/runtime/asm_amd64.s:2197

The error is while trying to do a syncDir in badger. From what I understand the syncDir should be performed in the Ubuntu Docker container and then Docker should handle syncing the directory with that on the host but it looks like its trying to fsync directly to Windows.

Metadata

Metadata

Assignees

Labels

kind/bugSomething is broken.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions