Version/Platform/Processor information (from ipfs version --all): ipfs version 0.4.4-dev
Type (bug, feature, meta, test failure, question): bug
Area (api, commands, daemon, fuse, etc): docker image
Priority (from P0: functioning, to P4: operations on fire): P2
Description:
I tried running the docker image and I ran into issues. I could not find this issue reported anywhere else so I am reporting it here. I am available to move it somewhere else if more appropriate.
You can find the output from my terminal below. I am running this on OS X:
$ docker run -d --name ipfs_host -v $ipfs_staging:/export -v $ipfs_data:/data/ipfs -p 8080:8080 -p 4001:4001 -p 5001:5001 ipfs/go-ipfs:latest
Unable to find image 'ipfs/go-ipfs:latest' locally
latest: Pulling from ipfs/go-ipfs
e110a4a17941: Pull complete
8df06ff256ec: Pull complete
c49bf4128b23: Pull complete
Digest: sha256:bf2118045b8c5c464b3baee82f0cb61465169cb2f4f186017226427480a9737f
Status: Downloaded newer image for ipfs/go-ipfs:latest
26fff16d2d14a85a57f2f5cd79633313a75a08bac35f3f39cc7af5ec005a5175
$ docker logs -f ipfs_host
ipfs version 0.4.4-dev
Found IPFS fs-repo at /data/ipfs
Initializing daemon...
06:18:14.272 ERROR cmd/ipfs: error from node construction: failure writing to dagstore: fsync: invalid argument daemon.go:295
Error: failure writing to dagstore: fsync: invalid argument
I tried removing the IPFS config directory and that did not fix the issue.
I still don't know how to fix this but I was considering trying to change the Docker image to use the version 0.4.2 instead of the version 0.4.4-dev (and see if the problem persists).
@marionzualo thanks for reporting! I'm definitely not very well versed in docker, but being on OSX makes me wonder... Does the -v option work properly on OSX? Last i recalled, docker on OSX works by running a docker daemon in a vm, i'm not sure how well filesystem mounts across OS's work.
Tried to replicate. Got pulled this image dfa55261af77, with version ipfs version 0.4.4-dev. Didn't have any problems. Can you docker pull again @marionzualo? My output at 0900 GMT is
[ root: core ]# date
Thu Aug 18 08:59:33 UTC 2016
[ root: core ]# docker images | grep ipfs
ipfs/go-ipfs latest dfa55261af77 11 hours ago 41.99 MB
@whyrusleeping Thanks for the pointer, I will look into the details of the -v option and see if it is something related to that. I will also try running the docker image using Linux as well.
@hermanjunge Thanks for the input I will try again then, and come back to you on an answer. Thanks.
@whyrusleeping @hermanjunge I did some digging and I think the issue is somehow related to mounting the volumes.
I'm using an older machine which only works with Docker Toolbox (instead of Docker for Mac). When I tried running on a new Mac with Docker for Mac the image worked perfectly without issues.
I wanted to find and fix the issue so I could at least potentially update the docs but I am not that knowledgeable on Docker in order to do that.
Thanks for the help.
P.S.
Anyhow, I just need the image so I can host an IPFS node at a VPS. So I'll just run the docker image on Linux.
I had the same experience. All tags worked on Docker for Mac but not Docker Toolbox on Mac OSX El Capitan
I'm getting a similar error using boot2docker (docker 17.05.0-ce, build 89658be)
on mac os with docker logs reporting:
ipfs version 0.4.9
Found IPFS fs-repo at /data/ipfs
Initializing daemon...
07:20:37.426 ERROR cmd/ipfs: error from node construction: failure writing to dagstore: sync /data/ipfs/blocks: invalid argument daemon.go:337
Error: failure writing to dagstore: sync /data/ipfs/blocks: invalid argument
Most helpful comment
@whyrusleeping @hermanjunge I did some digging and I think the issue is somehow related to mounting the volumes.
I'm using an older machine which only works with Docker Toolbox (instead of Docker for Mac). When I tried running on a new Mac with Docker for Mac the image worked perfectly without issues.
I wanted to find and fix the issue so I could at least potentially update the docs but I am not that knowledgeable on Docker in order to do that.
Thanks for the help.
P.S.
Anyhow, I just need the image so I can host an IPFS node at a VPS. So I'll just run the docker image on Linux.