For my audiobook-feeds github repository I needed docker to be able to use a host volume mount which contained a remote sshfs mount located on my local raspberry pi with a attached external hard drive. For my own sake of documentation and to offer you something to profit from, I created this small howto:
First of all, connect to your server and mount your remote device via sshfs using the -o allow_root flag. The allow_other option I tried first didn’t work for some reason.
sudo sshfs email@example.com:/my/remote/path/ /my/local/server/path/files/ -o allow_root,reconnect,default_permissions
Then run the container using the –privileged flag.
sudo docker run --privileged --rm -v `pwd`:/usr/src/myapp -w /usr/src/myapp -it --rm -p 127.0.0.1:8088:8080 --name audiobook-feeds audiobook-feeds go run feed.go
After that the root user of the container is able to list and to server the remote files.
I love podcasts.
I use them frequently and automatically downloaded by the Podcatcher BeyondPod onto my smartphone. In contrast to podcasts, I transfered my audiobooks to my smartphone by cable – which usually was very annoying. Therefore I wrote a little script that is able to close the gap by converting all my audiobooks into subscribable podcast feeds!
Of course it is open source and can be found here: https://github.com/PaulPetring/audiobook-feeds
Some adittional facts:
- it serves a website to browse your audiobooks and subscribe to certain books
- serves rss and atom feeds for import
- it offers a simple password protection to prevent copy right issues
- runs in docker container (see MakeFile and DockerFile)
- works when placed in subdirs example.com/audio/ (e.g. reg for ssl without wildcard)
- allows custom theming and uses material design as default theme
- handles encoding of filenames at best effort
Screenshot of the first available version of my audiobook-feeds project
I use it on regular basis and would like others to enjoy it as much as I do. So please feel free to use, spread and contribute to it. And see you soon 🙂