planetmint/docs/new/node-setup/all-in-one-planetmint.md
Jürgen Eckel 787a62c6af
removed header
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2022-09-30 05:43:19 +02:00

2.8 KiB

Run Planetmint with all-in-one Docker

For those who like using Docker and wish to experiment with Planetmint in non-production environments, we currently maintain a Planetmint all-in-one Docker image and a Dockerfile-all-in-one that can be used to build an image for planetmint.

This image contains all the services required for a Planetmint node i.e.

  • Planetmint Server
  • Tarantool
  • Tendermint

Note: NOT for Production Use: This is an single node opinionated image not well suited for a network deployment. This image is to help quick deployment for early adopters, for a more standard approach please refer to one of our deployment guides:

Prerequisite(s)

Pull and Run the Image from Docker Hub

With Docker installed, you can proceed as follows.

In a terminal shell, pull the latest version of the Planetmint all-in-one Docker image using:

$ docker pull planetmint/planetmint:all-in-one

$ docker run \
  --detach \
  --name planetmint \
  --publish 9984:9984 \
  --publish 9985:9985 \
  --publish 3303:3303 \
  --publish 26657:26657 \
  --volume $HOME/planetmint_docker/tarantool:/var/lib/tarantool \
  --volume $HOME/planetmint_docker/tendermint:/tendermint \
  planetmint/planetmint:all-in-one

Let's analyze that command:

  • docker run tells Docker to run some image
  • --detach run the container in the background
  • publish 9984:9984 map the host port 9984 to the container port 9984 (the Planetmint API server)
    • 9985 Planetmint Websocket server
    • 26657 Tendermint RPC server
    • 3303 Configured port for Tarantool
  • $HOME/planetmint_docker/tarantool:/var/lib/tarantool this allows us to have the data persisted on the host machine, you can read more in the official Docker documentation
  • $HOME/planetmint_docker/tendermint:/tendermint to persist Tendermint data.
  • planetmint/planetmint:all-in-one the image to use. All the options after the container name are passed on to the entrypoint inside the container.

Verify

$ docker ps | grep planetmint

Send your first transaction using Planetmint drivers.

Building Your Own Image

Assuming you have Docker installed, you would proceed as follows.

In a terminal shell:

git clone git@github.com:planetmint/planetmint.git
cd planetmint/

Build the Docker image:

docker build --file Dockerfile-all-in-one --tag <tag/name:latest> .

Now you can use your own image to run Planetmint all-in-one container.