question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker share - Archive not writable.

See original GitHub issue

Hi guys 😄

I’ve been experimenting with using dat as a docker volumes replacement. It’s been working quite well 🎉 👍 Only issue I’m having is that restarting the share service gives me an error: Archive not writable, cannot use share. Please use sync to resume download..

A quick example:

/Users/asbjorn/tmp/dat-data
❯ docker run --rm -v (pwd)/html:/html -it registry.taghub:5000/dat-data:0.0.1 share /html
dat v13.8.1
Created new dat in /html/.dat
dat://3a2ec47beee3cb74d354908cb7bfe2168616d07d135c22b297251561ef9fe32d
Sharing dat: (empty archive)

1 connection | Download 0 B/s Upload 0 B/s

Watching for file updates

Exiting the Dat program...
/Users/asbjorn/tmp/dat-data
❯ docker run --rm -v (pwd)/html:/html -it registry.taghub:5000/dat-data:0.0.1 share /html
Archive not writable, cannot use share. Please use sync to resume download.

So, I’m starting the share - everything looks good, the .dat folder is created etc. However, restarting with the exact same command gives me the above error. I’m pretty sure it’s some docker permissions thing where the uid og gid mismatch or something, but I haven’t been able to pin it down. Giving the folder 777 does not seem to help.

So I’ve been wondering how this dat.writable get’s determined and if we can find a clue there somewhere. Any ideas?

To Dockerfile is just:

FROM node:8
RUN npm install -g dat
ENTRYPOINT ["dat"]

Thanks 👍

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
asbjornengecommented, Sep 12, 2017

Ah, excellent! Suspected it was something like this 😛 I managed to work around it by simply mounting /root/.dat as a volume 👍

docker run --rm -v (pwd)/html:/html -v (pwd)/dat:/root/.dat -it registry.taghub:5000/dat-data:0.0.10 dat share /html

Thanks a bunch 🎉

0reactions
joehandcommented, Sep 11, 2017

Unfortunately, looks like there isn’t an option and it isn’t quite straightforward to add. Our storage APIs are tightly coupled right now ☹️ . This’ll be a good reason to improve that though!

Opened issue in dat-storage too https://github.com/datproject/dat-storage/issues/6

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker volume files not writable, written as root - Stack Overflow
I own a folder, /me/tmp to which I mount a docker volume: docker run -v /me/tmp/:/root/tmp/ . However when my Docker container creates ......
Read more >
Docker container issue: Folder not writable: /private/logs/ #256
Docker container created out of the image from your Docker file is not working properly - after accessing website, it says:.
Read more >
Avoiding Permission Issues With Docker-Created Files
The file permissions and ownership are all wrong. One frequent solution, is to “chown” your shared folder again and again. It's tedious and...
Read more >
Volume not writable to non-root user container - Swarm
Hi, I have a Stack deployed to my swarm and I'm trying to create named local volumes managed by Docker to persist some...
Read more >
Docker and the Host Filesystem Owner Matching Problem
This is because the host directory is only writable by the user who owns it, not by the user inside the container.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found