2.0 KiB
| title |
|---|
| Run Nwaku in Docker Container |
This guide provides detailed steps to build and run a nwaku node in a Docker container.
Prerequisites
Ensure Docker is installed on your system using the appropriate instructions provided in the Docker documentation. For example, you can use Docker's convenience script for installation:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Get Docker Image
The Nwaku Docker images are available on the Docker Hub public registry under the statusteam/nim-waku repository. Please visit statusteam/nim-waku/tags for images of specific releases.
To pull the latest image, run the following:
docker pull statusteam/nim-waku
You can also build the Docker image locally using:
git clone --recurse-submodules https://github.com/waku-org/nwaku
cd nwaku
docker build -t statusteam/nim-waku:latest .
Run Docker Container
To run nwaku in a new Docker container, run the following:
docker run [OPTIONS] [IMAGE] [ARG...]
OPTIONSare your selected Docker optionsIMAGEis the image and tag you pulled from the registry or built locallyARG...is the list of nwaku arguments for your chosen nwaku configuration
:::tip
We recommend using explicit port mappings (-p) when exposing ports accessible from outside the host (libp2p listening ports, discovery, HTTP server).
:::
To run nwaku in a Docker container using the default configuration, run the following:
docker run -i -t -p 60000:60000 -p 8545:8545 statusteam/nim-waku
:::tip
The docker run command automatically pulls the specified image from Docker Hub if it is not already available locally.
:::