A Docker image for Lotus Filecoin nodes.
These instructions will cover usage information and for the docker container
In order to run this container you'll need docker installed.
## Build the Docker image
make build
## Create folder and run the Docker container
mkdir -p $HOME/lotus && sudo chown -R 2000:2000 $HOME/lotus
make run
or using our image(intel cpu only)
docker run -d --name lotus \
-p 1234:1234 -p 1235:1235 \
-e INFRA_LOTUS_DAEMON="true" \
-e INFRA_LOTUS_HOME="/home/lotus_user" \
-e INFRA_IMPORT_SNAPSHOT="true" \
-e SNAPSHOTURL="https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car" \
-e INFRA_SYNC="true" \
--network host \
-v /tmp/lotus:/home/lotus_user \
glif/lotus:v1.9.0
or with compose
## Build the Docker image
docker-compose build
## Run the Docker container
## Set TAG before up
docker-compose up -d
Verify that the container is running successfully with:
docker ps
BRANCH
- The git release, tag or branchLOTUS_EXPORT
- Set to true if you want to export chain snapshots on a daily basis somewhereLOTUS_EXPORT_PATH
- If LOTUS_EXPORT is set to true - specify whether.car
file should be savedINFRA_SHEDEXPORT
- Set to true if you want to export chain snapshots usinglotus-shed
INFRA_SHEDEXPORTPERIOD
- Defines period of chain snapshotting. Examples: 1m, 1h, 1dINFRA_SHEDEXPORTPATH
- Defines path where to export chain snapshotINFRA_CLEAR_RESTART
- Set true if you want to remove all data when container will failINFRA_LOTUS_DAEMON
- Set true to start daemon after configureINFRA_LOTUS_GATEWAY
- Set true to start lotus gateway service.INFRA_LOTUS_HOME
- Define lotus home dirINFRA_LOTUS_LITE
- Set true to start lotus lite modeFULLNODE_API_INFO
- Set if you want to start lotus in lite mode.
INFRA_IMPORT_SNAPSHOT
- Set true for import snapshotSNAPSHOTURL
- SNAPSHOT URL (https://...)
/home/lotus_user/.lotus
- lotus main folder
/scripts/run
- Docker entrypoint script
- golang:1.15.5
- git
- mesa-opencl-icd
- ocl-icd-opencl-dev
- gcc
- bzr
- jq
- pkg-config
- clang
- libhwloc-dev
- ocl-icd-opencl-dev
If you want to start automatic build in Docker Hub, you have to:
- change variable
ARG BRANCH
inDockerfile
, push changes, create new tag, push tag to repository
or
- change variable
ARG BRANCH
inDockerfile
,BRANCH
inMakefile
and executemake git-push
If you want run build manually from master branch, you have to change variable ARG BRANCH
in Dockerfile
push to repository, start build on Docker Hub web page.
Example:
git commit -a -m "ntwk-butterfly-7.10.0" && git push && \
git tag ntwk-butterfly-7.10.0 && git push --tags
List of tag
you may find in lotus repository
It works with next tags:
- v*
- ntwk-*
New version is available in Docker Hub
Docker image contains:
- ubuntu:18.04
- curl
- nano
- libhwloc-dev
- lotus
- lotus-shed
- lotus-gateway
This project is licensed under the Apache 2.0 license.