项目作者: fooock

项目描述 :
Deploy and test IPFS using Docker
高级语言: Makefile
项目地址: git://github.com/fooock/deploy-ipfs-docker.git
创建时间: 2018-06-28T20:57:10Z
项目社区:https://github.com/fooock/deploy-ipfs-docker

开源协议:

下载


IPFS on Docker

License

Deploy IPFS with Docker using make. You can customize multiple things.

Requirements

You only need:

If you have Ubuntu, to install make simply use:

  1. $ sudo apt-get install make

Build params

You can customize multiple params. See next table.

Param Description Default value
NAME Name of the docker image ipfs-host
STAGING_DIR The maximum amount of memory the container can use $HOME/ipfs/staging
DATA_DIR The amount of memory this container is allowed to swap to disk $HOME/ipfs/data
COMMAND Specify how much of the available CPU resources a container can use version
RES Specify how much of the available CPU resources a container can use

Targets

You can execute these targets:

Param Description
build Pull the image and create the directory to store ipfs data
start Start the IPFS daemon
logs Show the IPFS logs
command Execute an IPFS command. For example, version
add Add a file or directory to IPFS
stop Stop and clean the IPFS docker container

Example

If you want to add a directory from the current directory like:

  1. .
  2. ├── test
  3. └── b.txt

Then

  1. $ make RES=test add
  2. docker exec ipfs-host ipfs add -r /export/test
  3. added QmeQkPj49FbmJ5BPjzg5GWS3VKmLP88f15n5zkzsSf4fKM test/b.txt
  4. added QmPRhop3GJ4FyEzBNWM9JKVG4Hm1v4HKdyvfEUHdytHb7P test