Running a Polaris Ethereum Cosmos-SDK with Docker
From docker container artifactory
The easiest way to run the node in a docker container is to use a pre-built container image. You can find the images in the container regsitry (Coming Soon).
From container image
-
Install Docker on your machine from the official website (opens in a new tab)
Verify it's installed
docker version
If not installed, verify that the path is set correctly and docker daemon is running in background
-
Pull the docker image
You can point to the release image. Referring to
latest
in this casedocker image pull <polaris-container-registry>/polaris:latest>
Note: Might have to use different docker image for different OS
-
Run the container image
docker run -p 1317:1317 <polaris-container-registry>/polaris:latest>
Now you have a node running on your machine with a default chain and we have RPC running on port 1317
and path eth/rpc
. To verify,
you can try eth_blockNumber
JSON-RPC example below -
curl -X POST 127.0.0.1:1317/eth/rpc -H 'Content-Type: application/json' -d '{ "jsonrpc":"2.0", "method":"eth_blockNumber", "params":[], "id":1}'
A successful JSON RPC query will return in following -
{
"jsonrpc": "2.0",
"id": 1,
"result": "<block_number>"
}