Image Overview: go-ipfs

Overview: go-ipfs Chainguard Image

Minimalist Wolfi-based image for go-ipfs.

Download this Image

The image is available on cgr.dev:

docker pull cgr.dev/chainguard/go-ipfs:latest

kubo (also referred to a go-ipfs) is a widely used implementation of the The InterPlanetary File System (IPFS) protocol. \

This kubo image has the following features:

  • An IPFS daemon server
  • An HTTP RPC API for controlling the node
  • An HTTP Gateway for serving content to HTTP browsers

Usage

To start using IPFS, you must first initialize IPFS’s config files on your system using the ipfs init command. See ipfs init --help for information on the optional arguments it takes. After initialization is complete, you can use ipfs mount, ipfs add and any of the other built in commands.

The following set of commands demonstrate how to initialize and run the ipfs image.

First, create a volume for the IPFS files and set the owner to nonroot:

docker run \
    --rm -t \
    -v ipfs-data:/home/nonroot/.ipfs \
    cgr.dev/chainguard/bash \
    'chown nonroot:nonroot /home/nonroot/.ipfs'

Next run ipfs init with the volume:

docker run --rm -t -v ipfs-data:/home/nonroot/.ipfs cgr.dev/chainguard/go-ipfs:latest init

Finally, run an IPFS container with the volume mounted:

docker run \
    -v ipfs-data:/home/nonroot/.ipfs \
    -d --rm \
    -p "5001:5001" \
    --name "ipfs" \
    cgr.dev/chainguard/go-ipfs:latest daemon --migrate=true
docker run cgr.dev/chainguard/go-ipfs:latest help

For more information, refer to the ipfs documentation:

Last updated: 2024-04-11 12:38