Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fooock/deploy-ipfs-docker
Deploy and test IPFS using Docker
https://github.com/fooock/deploy-ipfs-docker
deployment docker ipfs
Last synced: 25 days ago
JSON representation
Deploy and test IPFS using Docker
- Host: GitHub
- URL: https://github.com/fooock/deploy-ipfs-docker
- Owner: fooock
- Created: 2018-06-28T20:57:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-28T20:57:38.000Z (over 6 years ago)
- Last Synced: 2024-10-31T14:47:59.985Z (2 months ago)
- Topics: deployment, docker, ipfs
- Language: Makefile
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IPFS on Docker
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)Deploy IPFS with Docker using make. You can customize multiple things.
## Requirements
You only need:
* [Docker](https://docs.docker.com/)
* MakeIf you have `Ubuntu`, to install make simply use:
```bash
$ 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:```bash
.
├── test
│ └── b.txt
```Then
```bash
$ make RES=test add
docker exec ipfs-host ipfs add -r /export/test
added QmeQkPj49FbmJ5BPjzg5GWS3VKmLP88f15n5zkzsSf4fKM test/b.txt
added QmPRhop3GJ4FyEzBNWM9JKVG4Hm1v4HKdyvfEUHdytHb7P test
```