A bare bones IPFS installer for the Raspberry Pi and other ARM-based devices working in a Docker container
./run_image.sh
IPFS ports are exposed on:
- 15001
- 14001
- 18080
Volumes mapping
shared
: shared volume to add, get files between the host and the CLIrepo
: the IPFS repository
Open a browser at: http://host-ip:15001/ipfs/QmcB9KLBaivEU1NLpXH2UswDWQT23E1CbAcTsZprZqcho6#/files/
To read a file from the network: http://host-ip:18080/ipfs/Qmd4CVn3EgC1VQcF9dc2Y49pp7CuJKQe82pUS6ZnAo7abY
Note: you can jsut type ipfs
instead of sudo docker exec -it ipfs
ex:
sudo docker exec -it ipfs ipfs pin ls --type recursive
ipfs pin ls --type recursive
Use the /shared volume to add files in the unixfs:
cp -r mymovies shared/
sudo docker exec -it ipfs ipfs add -r /shared/mymovies/
added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH mymovies/movie1.avi
added Qmd4CVn3EgC1VQcF9dc2Y49pp7CuJKQe82pUS6ZnAo7abY mymovies/movie2.avi
added QmVRafFA8Qv4nGqRhUdDXDNn58hLQZTkSQ9YeYViDHJbGV mymovies
sudo docker exec -it ipfs ipfs files cp /ipfs/QmVRafFA8Qv4nGqRhUdDXDNn58hLQZTkSQ9YeYViDHJbGV /
sudo docker exec -it ipfs ipfs files mv /QmVRafFA8Qv4nGqRhUdDXDNn58hLQZTkSQ9YeYViDHJbGV /cool_movies
To pin a file locally:
sudo docker exec -it ipfs ipfs pin add QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH
sudo docker exec -it ipfs ipfs pin ls --type recursive
Thanks a lot to Claudio Bizzotto (fork from https://github.com/claudiobizzotto/ipfs-rpi) and Analog Void (https://github.com/analogvoid/rpi-ipfs) for the original code